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

MongoClient fails ConfigurationError: Unknown option type_registry

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 3.8
    • Affects Version/s: None
    • Component/s: None
    • None

      MongoClient has historically accepted CodecOptions's members as kwargs, however this does not work for type_registry:

      >>> client = MongoClient(type_registry=TypeRegistry)
      Traceback (most recent call last):
        File "<stdin>", line 1, in <module>
        File "pymongo/mongo_client.py", line 576, in __init__
          dict(common.validate(k, v) for k, v in keyword_opts.items()))
        File "pymongo/mongo_client.py", line 576, in <genexpr>
          dict(common.validate(k, v) for k, v in keyword_opts.items()))
        File "pymongo/common.py", line 681, in validate
          value = validator(option, value)
        File "pymongo/common.py", line 130, in raise_config_error
          raise ConfigurationError("Unknown option %s" % (key,))
      pymongo.errors.ConfigurationError: Unknown option type_registry
      

            Assignee:
            prashant.mital Prashant Mital (Inactive)
            Reporter:
            shane.harvey@mongodb.com Shane Harvey
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: