Uploaded image for project: 'Python Driver'
  1. Python Driver
  2. PYTHON-3159

AttributeError: 'ZlibContext' object has no attribute 'compress'

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Unknown Unknown
    • 4.1
    • Affects Version/s: None
    • Component/s: None
    • None

      zlib compression is failing since PYTHON-3060.

       [2022/02/03 22:40:52.622] ERROR: test_compression (test_client.TestClient)
       [2022/02/03 22:40:52.622] ----------------------------------------------------------------------
       [2022/02/03 22:40:52.622] Traceback (most recent call last):
       [2022/02/03 22:40:52.622]   File "/data/mci/f49c28c7f13c76060c17f3231f6a3a6b/src/test/test_client.py", line 1489, in test_compression
       [2022/02/03 22:40:52.622]     client.pymongo_test.test.find_one()
       [2022/02/03 22:40:52.622]   File "/data/mci/f49c28c7f13c76060c17f3231f6a3a6b/src/pymongo/collection.py", line 1202, in find_one
       [2022/02/03 22:40:52.622]     for result in cursor.limit(-1):
       [2022/02/03 22:40:52.622]   File "/data/mci/f49c28c7f13c76060c17f3231f6a3a6b/src/pymongo/cursor.py", line 1201, in next
       [2022/02/03 22:40:52.623]     if len(self.__data) or self._refresh():
       [2022/02/03 22:40:52.623]   File "/data/mci/f49c28c7f13c76060c17f3231f6a3a6b/src/pymongo/cursor.py", line 1121, in _refresh
       [2022/02/03 22:40:52.623]     self.__send_message(q)
       [2022/02/03 22:40:52.623]   File "/data/mci/f49c28c7f13c76060c17f3231f6a3a6b/src/pymongo/cursor.py", line 1013, in __send_message
       [2022/02/03 22:40:52.623]     operation, self._unpack_response, address=self.__address)
       [2022/02/03 22:40:52.623]   File "/data/mci/f49c28c7f13c76060c17f3231f6a3a6b/src/pymongo/mongo_client.py", line 1203, in _run_operation
       [2022/02/03 22:40:52.623]     address=address, retryable=isinstance(operation, message._Query))
       [2022/02/03 22:40:52.623]   File "/data/mci/f49c28c7f13c76060c17f3231f6a3a6b/src/pymongo/mongo_client.py", line 1302, in _retryable_read
       [2022/02/03 22:40:52.623]     return func(session, server, sock_info, read_pref)
       [2022/02/03 22:40:52.623]   File "/data/mci/f49c28c7f13c76060c17f3231f6a3a6b/src/pymongo/mongo_client.py", line 1199, in _cmd
       [2022/02/03 22:40:52.623]     unpack_res)
       [2022/02/03 22:40:52.623]   File "/data/mci/f49c28c7f13c76060c17f3231f6a3a6b/src/pymongo/server.py", line 99, in run_operation
       [2022/02/03 22:40:52.623]     read_preference, sock_info, use_cmd)
       [2022/02/03 22:40:52.623]   File "/data/mci/f49c28c7f13c76060c17f3231f6a3a6b/src/pymongo/message.py", line 327, in get_message
       [2022/02/03 22:40:52.623]     ctx=sock_info.compression_context)
       [2022/02/03 22:40:52.623]   File "/data/mci/f49c28c7f13c76060c17f3231f6a3a6b/src/pymongo/message.py", line 582, in _op_msg
       [2022/02/03 22:40:52.623]     flags, command, identifier, docs, opts, ctx)
       [2022/02/03 22:40:52.623]   File "/data/mci/f49c28c7f13c76060c17f3231f6a3a6b/src/pymongo/message.py", line 550, in _op_msg_compressed
       [2022/02/03 22:40:52.623]     rid, msg = _compress(2013, msg, ctx)
       [2022/02/03 22:40:52.623]   File "/data/mci/f49c28c7f13c76060c17f3231f6a3a6b/src/pymongo/message.py", line 486, in _compress
       [2022/02/03 22:40:52.623]     compressed = ctx.compress(data)
       [2022/02/03 22:40:52.623] AttributeError: 'ZlibContext' object has no attribute 'compress'
      

      https://evergreen.mongodb.com/task/mongo_python_driver_tests_python_version_ubuntu18_compression__platform~ubuntu_18.04_compression~zlib_python_version~system_python3_c_extensions~without_c_extensions_test_latest_standalone_dd6c140d438039e9f6df96cd3d4221f380a37e18_22_02_03_03_12_36

            Assignee:
            shane.harvey@mongodb.com Shane Harvey
            Reporter:
            shane.harvey@mongodb.com Shane Harvey
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: