I don’t know why I got this error, but it totally suck. I can’t install program with pip.

Today I just following instruction from Corey Schafer Youtube about JSON API requests and the program did a lot of requests (about 4800+), to formulae.brew.sh

But after several minutes it stuck and stop working.

Because I have to follow along his tutorial, I uploaded the script on my linux server and run it (and worked)

The Problem Comes 

The tutorial part was done. I remember to upgrade youtube-dl, nah I got the long error messages.

1
2
3
  File "/usr/lib/python3.7/site-packages/cachecontrol/adapter.py", line 107, in build_response
    if response.chunked:
AttributeError: 'HTTPResponse' object has no attribute 'chunked'

How to fix it?

All you have to do is cd to /usr/lib/python3.7/site-packages/cachecontrol/ and open adapter.py

Fix Attribute Error : HTTPResponse Chunked

Search for if response.chunked:

Remove/comment it then paste this code if hasattr(response, 'chunked') and response.chunked:

Then save the file.

Try to install something with pip.

For more informations about this problem you can follow the link in the reference section.

Reference :