Detailed steps to reproduce the problem?
python3 main.py
Traceback (most recent call last):
File "/Users/user/Workspace/tmp/pymongo-test/main.py", line 11, in <module>
client = pymongo.MongoClient(uri)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/user/Workspace/tmp/pymongo-test/venv/lib/python3.11/site-packages/pymongo/mongo_client.py", line 748, in _init_
res = uri_parser.parse_uri(
^^^^^^^^^^^^^^^^^^^^^
File "/Users/user/Workspace/tmp/pymongo-test/venv/lib/python3.11/site-packages/pymongo/uri_parser.py", line 539, in parse_uri
nodes = dns_resolver.get_hosts()
^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/user/Workspace/tmp/pymongo-test/venv/lib/python3.11/site-packages/pymongo/srv_resolver.py", line 121, in get_hosts
_, nodes = self._get_srv_response_and_hosts(True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/user/Workspace/tmp/pymongo-test/venv/lib/python3.11/site-packages/pymongo/srv_resolver.py", line 115, in _get_srv_response_and_hosts
raise ConfigurationError(f"Invalid SRV host: {node[0]}")
pymongo.errors.ConfigurationError: Invalid SRV host: mongodb-r.jeongmu-rs-b001.mdev-RegionOne.mg.db.***.com
The exact Python version used, with patch level:
$ python -c "import sys; print(sys.version)"
3.11.4 (main, Jun 15 2023, 07:55:38) [Clang 14.0.3 (clang-1403.0.22.14.1)]
The exact version of PyMongo used, with patch level:
$ python -c "import pymongo; print(pymongo.version); print(pymongo.has_c())"
4.4.0
True
The operating system and version (e.g. Windows 7, OSX 10.8, ...)
macOS 13.4.1(22F82)
Web framework or asynchronous network library used, if any, with version (e.g. Django 1.7, mod_wsgi 4.3.0, gevent 1.0.1, Tornado 4.0.2, ...)
Nothing
- is related to
-
DRIVERS-2668 Add SRV test with capital letters in hostnames
- Implementing