influxdb-python icon indicating copy to clipboard operation
influxdb-python copied to clipboard

Received response with content-encoding: gzip, but failed to decode it.', error('Error -3 while decompressing data: incorrect header check

Open Karmenzind opened this issue 4 years ago • 2 comments

  • InfluxDB version: 1.7.6
  • InfluxDB-python version: 5.3.1
  • Python version: 3.8.6
  • Operating system version: Linux version 5.4.85-1-MANJARO (builduser@LEGION) (gcc version 10.2.0 (GCC)) #1 SMP PREEMPT Mon Dec 21 21:38:53 UTC 2020

Running:

client = InfluxDBClient(host=xxx, port=xxx, database=xxx)
q = FLUX.query("SHOW MEASUREMENTS")

Raised:

Traceback (most recent call last):
  File "/home/kmz/.pyenv/versions/3.8.6/envs/mona_py38/lib/python3.8/site-packages/urllib3/response.py", line 401, in _decode
    data = self._decoder.decompress(data)
  File "/home/kmz/.pyenv/versions/3.8.6/envs/mona_py38/lib/python3.8/site-packages/urllib3/response.py", line 88, in decompress
    ret += self._obj.decompress(data)
zlib.error: Error -3 while decompressing data: incorrect header check

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/kmz/.pyenv/versions/3.8.6/envs/mona_py38/lib/python3.8/site-packages/requests/models.py", line 753, in generate
    for chunk in self.raw.stream(chunk_size, decode_content=True):
  File "/home/kmz/.pyenv/versions/3.8.6/envs/mona_py38/lib/python3.8/site-packages/urllib3/response.py", line 576, in stream
    data = self.read(amt=amt, decode_content=decode_content)
  File "/home/kmz/.pyenv/versions/3.8.6/envs/mona_py38/lib/python3.8/site-packages/urllib3/response.py", line 548, in read
    data = self._decode(data, decode_content, flush_decoder)
  File "/home/kmz/.pyenv/versions/3.8.6/envs/mona_py38/lib/python3.8/site-packages/urllib3/response.py", line 404, in _decode
    raise DecodeError(
urllib3.exceptions.DecodeError: ('Received response with content-encoding: gzip, but failed to decode it.', error('Error -3 while decompressing data: incorrect
 header check'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "scripts/tools/update_metrics.py", line 84, in <module>
    main()
  File "/home/kmz/Workspace/tstalker/MonA/branches/dev/labutils/decorators.py", line 77, in wrapper
    return fn(*args, **kwargs)
  File "scripts/tools/update_metrics.py", line 27, in main
    q = FLUX.query(
  File "/home/kmz/.pyenv/versions/3.8.6/envs/mona_py38/lib/python3.8/site-packages/influxdb/client.py", line 521, in query
    response = self.request(
  File "/home/kmz/.pyenv/versions/3.8.6/envs/mona_py38/lib/python3.8/site-packages/influxdb/client.py", line 332, in request
    response = self._session.request(
  File "/home/kmz/.pyenv/versions/3.8.6/envs/mona_py38/lib/python3.8/site-packages/requests/sessions.py", line 542, in request
    resp = self.send(prep, **send_kwargs)
  File "/home/kmz/.pyenv/versions/3.8.6/envs/mona_py38/lib/python3.8/site-packages/requests/sessions.py", line 697, in send
    r.content
  File "/home/kmz/.pyenv/versions/3.8.6/envs/mona_py38/lib/python3.8/site-packages/requests/models.py", line 831, in content
    self._content = b''.join(self.iter_content(CONTENT_CHUNK_SIZE)) or b''
  File "/home/kmz/.pyenv/versions/3.8.6/envs/mona_py38/lib/python3.8/site-packages/requests/models.py", line 758, in generate
    raise ContentDecodingError(e)
requests.exceptions.ContentDecodingError: ('Received response with content-encoding: gzip, but failed to decode it.', error('Error -3 while decompressing data:
 incorrect header check'))


Karmenzind avatar Jan 15 '21 11:01 Karmenzind

@Karmenzind have you got the solution for this?

MamtaGarg avatar Jan 20 '22 18:01 MamtaGarg

@MamtaGarg Not yet.

Karmenzind avatar Jan 21 '22 06:01 Karmenzind