osrf / rocker

A tool to run docker containers with overlays and convenient options for things like GUIs etc.
Apache License 2.0
584 stars 75 forks source link

Released version 0.2.12 - unexpected keyword argument 'chunked' #230

Closed qw8z5fUB closed 1 year ago

qw8z5fUB commented 1 year ago

Just noting that the time of writing, the following fails:

python3 -m venv venv
source venv/bin/activate
pip install --upgrade pip
pip install rocker
rocker --version

With error

rocker: error: DependencyMissing encountered: Docker Client failed to connect to docker daemon. Please verify that docker is installed and running. As well as that you have permission to access the docker daemon. This is usually by being a member of the docker group. The underlying error was:
"""
Error while fetching server API version: request() got an unexpected keyword argument 'chunked'
"""

My venv package versions:

certifi==2022.12.7
charset-normalizer==3.1.0
docker==6.0.1
empy==3.3.4
idna==3.4
packaging==23.1
pexpect==4.8.0
pkg_resources==0.0.0
ptyprocess==0.7.0
requests==2.30.0
rocker==0.2.12
urllib3==2.0.2
websocket-client==1.5.1

I see from 2a7e15f0fe638a7c51c7bf15a1f09e6e49b62b75 you're aware of this, but that change was made after the release.

I'm guessing if this issue is ignored it will resolve itself once a fix for the upstream docker issue https://github.com/docker/docker-py/issues/3113 is released. So simplest option may be to just wait for that, but I'm not sure how long that will take, and in the meantime it looks like new rocker installs may be broken.

tfoote commented 1 year ago

Unfortunately I don't have a good way to resolve this. It's the combination of the two dependencies docker-py version and urllib3 version. Even old installations of rocker will fail due to the issue you linked if urllib3 is upgraded on the system/in the virtualenv.

tfoote commented 1 year ago

Looking in again it looks like it's fixed with docker-py 6.1.0

https://github.com/docker/docker-py/issues/3113#issuecomment-1536476705

And I just verified a clean installation in a virtualenv works:

tullyfoote@bigfoote:/tmp$ . urllib3test/bin/activate
(urllib3test) tullyfoote@bigfoote:/tmp$ pip install --upgrade pip

Requirement already satisfied: pip in ./urllib3test/lib/python3.10/site-packages (22.3.1)
Collecting pip
  Downloading pip-23.1.2-py3-none-any.whl (2.1 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.1/2.1 MB 28.6 MB/s eta 0:00:00
Installing collected packages: pip
  Attempting uninstall: pip
    Found existing installation: pip 22.3.1
    Uninstalling pip-22.3.1:
      Successfully uninstalled pip-22.3.1
Successfully installed pip-23.1.2
(urllib3test) tullyfoote@bigfoote:/tmp$ 
(urllib3test) tullyfoote@bigfoote:/tmp$ pip install rocker
Collecting rocker
  Downloading rocker-0.2.12-py3-none-any.whl (23 kB)
Collecting empy (from rocker)
  Using cached empy-3.3.4.tar.gz (62 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting pexpect (from rocker)
  Using cached pexpect-4.8.0-py2.py3-none-any.whl (59 kB)
Collecting packaging (from rocker)
  Downloading packaging-23.1-py3-none-any.whl (48 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 48.9/48.9 kB 3.8 MB/s eta 0:00:00
Collecting docker (from rocker)
  Downloading docker-6.1.2-py3-none-any.whl (148 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 148.1/148.1 kB 9.7 MB/s eta 0:00:00
Collecting requests>=2.26.0 (from docker->rocker)
  Downloading requests-2.30.0-py3-none-any.whl (62 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 62.5/62.5 kB 8.9 MB/s eta 0:00:00
Collecting urllib3>=1.26.0 (from docker->rocker)
  Downloading urllib3-2.0.2-py3-none-any.whl (123 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 123.2/123.2 kB 12.6 MB/s eta 0:00:00
Collecting websocket-client>=0.32.0 (from docker->rocker)
  Downloading websocket_client-1.5.1-py3-none-any.whl (55 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 55.9/55.9 kB 5.7 MB/s eta 0:00:00
Collecting ptyprocess>=0.5 (from pexpect->rocker)
  Using cached ptyprocess-0.7.0-py2.py3-none-any.whl (13 kB)
Collecting charset-normalizer<4,>=2 (from requests>=2.26.0->docker->rocker)
  Using cached charset_normalizer-3.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (199 kB)
Collecting idna<4,>=2.5 (from requests>=2.26.0->docker->rocker)
  Using cached idna-3.4-py3-none-any.whl (61 kB)
Collecting certifi>=2017.4.17 (from requests>=2.26.0->docker->rocker)
  Downloading certifi-2023.5.7-py3-none-any.whl (156 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 157.0/157.0 kB 12.9 MB/s eta 0:00:00
Building wheels for collected packages: empy
  Building wheel for empy (pyproject.toml) ... done
  Created wheel for empy: filename=empy-3.3.4-py3-none-any.whl size=29338 sha256=7c33b974f9babc29136ad8633af893e9eab0d831d904f1cf5eaf58af41b9053e
  Stored in directory: /usr/local/google/home/tullyfoote/.cache/pip/wheels/e1/e4/1c/d5dfe71bdbf561652eb836b137dabf120043a3086217f0f062
Successfully built empy
Installing collected packages: ptyprocess, empy, websocket-client, urllib3, pexpect, packaging, idna, charset-normalizer, certifi, requests, docker, rocker
Successfully installed certifi-2023.5.7 charset-normalizer-3.1.0 docker-6.1.2 empy-3.3.4 idna-3.4 packaging-23.1 pexpect-4.8.0 ptyprocess-0.7.0 requests-2.30.0 rocker-0.2.12 urllib3-2.0.2 websocket-client-1.5.1
(urllib3test) tullyfoote@bigfoote:/tmp$ rocker --version
Extension volume doesn't support default arguments. Please extend it.
rocker 0.2.12