podman-py: podman.from_env() not working
Everytime I try podman.from_env() I get this error:
>>> import podman
>>> podman.from_env()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.6/site-packages/podman/client.py", line 131, in from_env
max_pool_size=max_pool_size,
File "/usr/local/lib/python3.6/site-packages/podman/client.py", line 76, in __init__
self.api = APIClient(**api_kwargs)
File "/usr/local/lib/python3.6/site-packages/podman/api/client.py", line 116, in __init__
self.base_url = self._normalize_url(base_url)
File "/usr/local/lib/python3.6/site-packages/podman/api/client.py", line 159, in _normalize_url
f"The scheme '{uri.scheme}' must be one of {APIClient.supported_schemes}"
ValueError: The scheme 'b''' must be one of ('unix', 'http+unix', 'ssh', 'http+ssh', 'tcp', 'http')
Have tried CentOS 8 stream with a native podman setup and MacOS with podman machine.
Are they any pre-reqs to be able to use podman.from_env() ?
Thanks
CentOS Stream release 8:
$ podman version
Client: Podman Engine
Version: 4.2.0
API Version: 4.2.0
Go Version: go1.18.4
Built: Wed Sep 21 13:15:04 2022
OS/Arch: linux/amd64
MacOS:
% podman version
Client: Podman Engine
Version: 4.3.0
API Version: 4.3.0
Go Version: go1.19
Git Commit: ad42af94903ce4f3c3cd0693e4e17e4286bf094b
Built: Wed Oct 19 15:33:33 2022
OS/Arch: darwin/amd64
Server: Podman Engine
Version: 4.3.1
API Version: 4.3.1
Go Version: go1.19.2
Built: Fri Nov 11 16:01:27 2022
OS/Arch: linux/amd64
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 1
- Comments: 17 (6 by maintainers)
you should NOT be communication with the /var/run/podman/podman.sock from non root users. If you want to run rootless containers then you should start a rootless podman service
systemctsl --user start podman.socket
Hi @josecastillolema
I just tested on my machine. It is probably an issue with the right on /var/run/podman/podman.sock
I need to test to restart the podman.socket service and run it as root:wheel