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

Test Failure - query_type must be str or None, not: <enum 'QueryType'>

    • Type: Icon: Build Failure Build Failure
    • Resolution: Fixed
    • Priority: Icon: Unknown Unknown
    • 4.2
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None

      This failure can be seen in this test run, and is related to Queryable Encryption.

      [2022/06/17 14:53:03.676] ERROR: test_01_insert_encrypted_indexed_and_find (test.test_encryption.TestExplicitQueryableEncryption)
      [2022/06/17 14:53:03.676] ----------------------------------------------------------------------
      [2022/06/17 14:53:03.676] Traceback (most recent call last):
      [2022/06/17 14:53:03.676]   File "C:\data\mci\a870fb383b4928f2446d5363e948534a\src\pymongo\encryption.py", line 73, in _wrap_encryption_errors
      [2022/06/17 14:53:03.676]     yield
      [2022/06/17 14:53:03.676]   File "C:\data\mci\a870fb383b4928f2446d5363e948534a\src\pymongo\encryption.py", line 647, in encrypt
      [2022/06/17 14:53:03.676]     encrypted_doc = self._encryption.encrypt(
      [2022/06/17 14:53:03.676]   File "Z:\data\mci\a870fb383b4928f2446d5363e948534a\src\venv-encryption\lib\site-packages\pymongocrypt\explicit_encrypter.py", line 185, in encrypt
      [2022/06/17 14:53:03.676]     opts = ExplicitEncryptOpts(
      [2022/06/17 14:53:03.676]   File "Z:\data\mci\a870fb383b4928f2446d5363e948534a\src\venv-encryption\lib\site-packages\pymongocrypt\explicit_encrypter.py", line 44, in __init__
      [2022/06/17 14:53:03.676]     raise TypeError(
      [2022/06/17 14:53:03.676] TypeError: query_type must be str or None, not: <enum 'QueryType'>
      [2022/06/17 14:53:03.676] During handling of the above exception, another exception occurred:
      [2022/06/17 14:53:03.676] Traceback (most recent call last):
      [2022/06/17 14:53:03.676]   File "C:\data\mci\a870fb383b4928f2446d5363e948534a\src\test\test_encryption.py", line 2028, in test_01_insert_encrypted_indexed_and_find
      [2022/06/17 14:53:03.676]     find_payload = self.client_encryption.encrypt(
      [2022/06/17 14:53:03.676]   File "C:\data\mci\a870fb383b4928f2446d5363e948534a\src\pymongo\encryption.py", line 656, in encrypt
      [2022/06/17 14:53:03.676]     return decode(encrypted_doc)["v"]  # type: ignore[index]
      [2022/06/17 14:53:03.676]   File "C:\python\Python39\lib\contextlib.py", line 137, in __exit__
      [2022/06/17 14:53:03.676]     self.gen.throw(typ, value, traceback)
      [2022/06/17 14:53:03.676]   File "C:\data\mci\a870fb383b4928f2446d5363e948534a\src\pymongo\encryption.py", line 79, in _wrap_encryption_errors
      [2022/06/17 14:53:03.676]     raise EncryptionError(exc)
      [2022/06/17 14:53:03.676] pymongo.errors.EncryptionError: query_type must be str or None, not: <enum 'QueryType'>
      

            Assignee:
            Unassigned Unassigned
            Reporter:
            steve.silvester@mongodb.com Steve Silvester
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: