【Python】Requests报错:requests.exceptions.ChunkedEncodingError

报错类型

Requests报错:requests.exceptions.ChunkedEncodingError

我遇到的报错内容

【Python】Requests报错:requests.exceptions.ChunkedEncodingError_第1张图片

  File "xxxxxx\venvs\lib\site-packages\requests\models.py", line 832, in content
    self._content = b''.join(self.iter_content(CONTENT_CHUNK_SIZE)) or b''
  File "xxxxxx\venvs\lib\site-packages\requests\models.py", line 757, in generate
    raise ChunkedEncodingError(e)
requests.exceptions.ChunkedEncodingError: ("Connection broken: InvalidChunkLength(got length b'', 0 bytes read)", InvalidChunkLength(got length b'', 0 bytes read))

寻找到的解决方法

修改源码(venvs\lib\site-packages\requests\models.py):
我这里是757行,注释raise,补一个pass
【Python】Requests报错:requests.exceptions.ChunkedEncodingError_第2张图片

你可能感兴趣的:(Python,python)