google-deepmind / alphafold

Open source code for AlphaFold.
Apache License 2.0
12.73k stars 2.26k forks source link

"TypeError: HTTPConnection.request() got an unexpected keyword argument 'chunked'" error while running AlphaFold #853

Open RuiJoaoLoureiro2019 opened 1 year ago

RuiJoaoLoureiro2019 commented 1 year ago

Dear AlphaFold users and/or developers,

I'm struggling to find the root cause of two error messages "File "/home/rloureiro/alphafold/alphafold-env/lib/python3.10/site-packages/urllib3/connectionpool.py", line 497, in _make_request conn.request( TypeError: HTTPConnection.request() got an unexpected keyword argument 'chunked'" and "During handling of the above exception, another exception occurred: File "/home/rloureiro/alphafold/alphafold-env/lib/python3.10/site-packages/docker/api/client.py", line 221, in _retrieve_server_version raise DockerException( docker.errors.DockerException: Error while fetching server API version: HTTPConnection.request() got an unexpected keyword argument 'chunked'" while trying to run AlphaFold on a local machine with Ubuntu 22.04 LTS, CUDA 12.2 and the compatible latest version of Docker. I installed AlphaFold dependencies and tried to run AlphaFold on a Python environment having Python 3.10.12. I uninstalled and reinstalled Docker and AlphaFold but I got the same mistakes when trying to run it. Any support in solving this issue would be highly appreciated.

With best regards, Rui João Loureiro

laolanllx commented 12 months ago

same error here, running successfully before, with ubuntu 20.04, CUDA 11.5 and DRIVER 510.85.02

laolanllx commented 12 months ago

same error here, running successfully before, with ubuntu 20.04, CUDA 11.5 and DRIVER 510.85.02

solved, I used the wrong python. Changed the python path solved this.

RuiJoaoLoureiro2019 commented 12 months ago

Hi @laolanllx !

Thanks for your quick feeedback. Did you mean you were running AlphaFold in a python environment and used Python from your system environment?

Thanks

laolanllx commented 12 months ago

Hi @laolanllx !

Thanks for your quick feeedback. Did you mean you were running AlphaFold in a python environment and used Python from your system environment?

Thanks

I installled alphafold based on conda environment. When I used which python to check , it showed it's not the alphafold one. Thus, I exit and login and reactivate my alphafold environment. Then it works. Hope this can help you.

LaurinLang commented 12 months ago

Could you share what the full package list for your environment you run alphafold in looks like now? I just got a fresh install today and face the same error.

RuiJoaoLoureiro2019 commented 12 months ago

Hi @laolanllx! Did you change any of the Dockerfile settings to match your CUDA version and OS? I just did it and instead of solving the problem, I got an error in the build phase of the installation "ERROR: failed to solve: nvidia/cuda:12.2-cudnn8-runtime-ubuntu22.04: docker.io/nvidia/cuda:12.2-cudnn8-runtime-ubuntu22.04: not found". Previously to that, I have run AlphaFold outside a virtual environment just to test and it began to run but then it crashed in the HHSearch phase.

laolanllx commented 12 months ago

Hi @laolanllx! Did you change any of the Dockerfile settings to match your CUDA version and OS? I just did it and instead of solving the problem, I got an error in the build phase of the installation "ERROR: failed to solve: nvidia/cuda:12.2-cudnn8-runtime-ubuntu22.04: docker.io/nvidia/cuda:12.2-cudnn8-runtime-ubuntu22.04: not found". Previously to that, I have run AlphaFold outside a virtual environment just to test and it began to run but then it crashed in the HHSearch phase.

no, I didn't because I use an old version of alphafold. I think it's a 2.2.* one. This one works perfectly on my old machine. However, when I set up AF2.3.2 on a new one with 4090 GPU, Ubuntu22.04 CUDA 12.2 Driver 535.104.05. Some error appear and haven't solved till now #764 . Even though I change the Dockerfile like this, ARG CUDA=11.1.1------->ARG CUDA=11.8.0 FROM nvidia/cuda:${CUDA}-cudnn8-runtime-ubuntu18.04------->FROM nvidia/cuda:${CUDA}-cudnn8-devel-ubuntu20.04 https://github.com/google-deepmind/alphafold/issues/764#issuecomment-1679537433

laolanllx commented 12 months ago

Hi @laolanllx! Did you change any of the Dockerfile settings to match your CUDA version and OS? I just did it and instead of solving the problem, I got an error in the build phase of the installation "ERROR: failed to solve: nvidia/cuda:12.2-cudnn8-runtime-ubuntu22.04: docker.io/nvidia/cuda:12.2-cudnn8-runtime-ubuntu22.04: not found". Previously to that, I have run AlphaFold outside a virtual environment just to test and it began to run but then it crashed in the HHSearch phase.

321 mentioned a new way to change Dockerfile, you can try it. https://github.com/google-deepmind/alphafold/issues/321#issuecomment-1475245689 I tried yesterday, but didn't work for me, maybe the python version issue (it used python3.8). I'll try this again later.

titusfx commented 11 months ago

I dunno if is the same problem that I have but I fix that changing docker-compose to docker compose

GuShaocheng commented 11 months ago

Hi everyone, what is a real issue? I installed the latest version, had a similar issue: lib/python3.10/site-packages/docker/api/client.py", line 221, in _retrieve_server_version raise DockerException( docker.errors.DockerException: Error while fetching server API version: HTTPConnection.request() got an unexpected keyword argument 'chunked'

damiano-sg commented 10 months ago

Hi everyone, I had the same issue and I solved it by installing a different version of requests, I used version 2.28.1

ocstx commented 5 months ago

Just installed latest version of AF and found the same issue, but... First I got the following error: requests.exceptions.InvalidURL: Not supported URL scheme http+docker According to this: https://github.com/docker/docker-py/issues/3256 can be fixed by using the previous version of requests (2.31.0) So I did it It is with requests==2.31.0 that I found the "got an unexpected keyword argument 'chunked'" error. Your solution is still valid. requests==2.28.1 solved the issue. Perhaps requests==2.28.1 could be added to the "alphafold/docker/requirements.txt" file thank you very much