alphafold icon indicating copy to clipboard operation
alphafold copied to clipboard

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

Open RuiJoaoLoureiro2019 opened this issue 2 years ago • 12 comments

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

RuiJoaoLoureiro2019 avatar Nov 07 '23 10:11 RuiJoaoLoureiro2019

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

laolanllx avatar Nov 08 '23 03:11 laolanllx

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.

laolanllx avatar Nov 08 '23 03:11 laolanllx

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

RuiJoaoLoureiro2019 avatar Nov 08 '23 08:11 RuiJoaoLoureiro2019

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.

laolanllx avatar Nov 08 '23 09:11 laolanllx

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.

LaurinLang avatar Nov 08 '23 21:11 LaurinLang

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.

RuiJoaoLoureiro2019 avatar Nov 09 '23 11:11 RuiJoaoLoureiro2019

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 avatar Nov 10 '23 02:11 laolanllx

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.

laolanllx avatar Nov 10 '23 02:11 laolanllx

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

titusfx avatar Nov 24 '23 16:11 titusfx

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'

GuShaocheng avatar Nov 30 '23 13:11 GuShaocheng

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

damiano-sg avatar Dec 13 '23 12:12 damiano-sg

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

ocstx avatar May 29 '24 11:05 ocstx