-
Type: Build Failure
-
Resolution: Fixed
-
Priority: Unknown
-
Affects Version/s: None
-
Component/s: None
-
None
-
Python Drivers
-
Not Needed
-
Name of Failure:
ModuleNotFoundError: No module named 'dns'
Link to task:
Context of when and why the failure occurred:
We introduced lazy imports in PYTHON-4260, which seems to not work with mod_wsgi, but there could be something different about the way the package is consumed during these tests (missing dependencies).
Stack trace:
[2024/04/08 18:12:55.775] [Mon Apr 08 23:12:55.423259 2024] [mpm_prefork:notice] [pid 82885] AH00163: Apache/2.4.52 (Ubuntu) mod_wsgi/4.9.4 Python/3.9 configured -- resuming normal operations [2024/04/08 18:12:55.775] [Mon Apr 08 23:12:55.423330 2024] [core:notice] [pid 82885] AH00094: Command line: '/usr/sbin/apache2 -f /data/mci/c3f84ff0882eb692edbfdf2da222769c/src/test/mod_wsgi_test/apache24ubuntu161404.conf' [2024/04/08 18:12:55.775] [Mon Apr 08 23:12:55.773679 2024] [wsgi:error] [pid 82887] [remote 127.0.0.1:41112] mod_wsgi (pid=82887): Failed to exec Python script file '/data/mci/c3f84ff0882eb692edbfdf2da222769c/src/test/mod_wsgi_test/mod_wsgi_test.py'. [2024/04/08 18:12:55.775] [Mon Apr 08 23:12:55.773712 2024] [wsgi:error] [pid 82887] [remote 127.0.0.1:41112] mod_wsgi (pid=82887): Exception occurred processing WSGI script '/data/mci/c3f84ff0882eb692edbfdf2da222769c/src/test/mod_wsgi_test/mod_wsgi_test.py'. [2024/04/08 18:12:55.775] [Mon Apr 08 23:12:55.774151 2024] [wsgi:error] [pid 82887] [remote 127.0.0.1:41112] Traceback (most recent call last): [2024/04/08 18:12:55.775] [Mon Apr 08 23:12:55.774168 2024] [wsgi:error] [pid 82887] [remote 127.0.0.1:41112] File "/data/mci/c3f84ff0882eb692edbfdf2da222769c/src/test/mod_wsgi_test/mod_wsgi_test.py", line 32, in <module> [2024/04/08 18:12:55.775] [Mon Apr 08 23:12:55.774170 2024] [wsgi:error] [pid 82887] [remote 127.0.0.1:41112] import pymongo [2024/04/08 18:12:55.775] [Mon Apr 08 23:12:55.774172 2024] [wsgi:error] [pid 82887] [remote 127.0.0.1:41112] File "/data/mci/c3f84ff0882eb692edbfdf2da222769c/src/pymongo/__init__.py", line 93, in <module> [2024/04/08 18:12:55.775] [Mon Apr 08 23:12:55.774173 2024] [wsgi:error] [pid 82887] [remote 127.0.0.1:41112] from pymongo.mongo_client import MongoClient [2024/04/08 18:12:55.775] [Mon Apr 08 23:12:55.774175 2024] [wsgi:error] [pid 82887] [remote 127.0.0.1:41112] File "/data/mci/c3f84ff0882eb692edbfdf2da222769c/src/pymongo/mongo_client.py", line 61, in <module> [2024/04/08 18:12:55.775] [Mon Apr 08 23:12:55.774176 2024] [wsgi:error] [pid 82887] [remote 127.0.0.1:41112] from pymongo import ( [2024/04/08 18:12:55.775] [Mon Apr 08 23:12:55.774178 2024] [wsgi:error] [pid 82887] [remote 127.0.0.1:41112] File "/data/mci/c3f84ff0882eb692edbfdf2da222769c/src/pymongo/uri_parser.py", line 43, in <module> [2024/04/08 18:12:55.775] [Mon Apr 08 23:12:55.774179 2024] [wsgi:error] [pid 82887] [remote 127.0.0.1:41112] from pymongo.srv_resolver import _HAVE_DNSPYTHON, _SrvResolver [2024/04/08 18:12:55.775] [Mon Apr 08 23:12:55.774181 2024] [wsgi:error] [pid 82887] [remote 127.0.0.1:41112] File "/data/mci/c3f84ff0882eb692edbfdf2da222769c/src/pymongo/srv_resolver.py", line 29, in <module> [2024/04/08 18:12:55.775] [Mon Apr 08 23:12:55.774182 2024] [wsgi:error] [pid 82887] [remote 127.0.0.1:41112] resolver = lazy_import("dns.resolver") [2024/04/08 18:12:55.775] [Mon Apr 08 23:12:55.774183 2024] [wsgi:error] [pid 82887] [remote 127.0.0.1:41112] File "/data/mci/c3f84ff0882eb692edbfdf2da222769c/src/pymongo/_lazy_import.py", line 27, in lazy_import [2024/04/08 18:12:55.775] [Mon Apr 08 23:12:55.774185 2024] [wsgi:error] [pid 82887] [remote 127.0.0.1:41112] spec = importlib.util.find_spec(name) [2024/04/08 18:12:55.775] [Mon Apr 08 23:12:55.774186 2024] [wsgi:error] [pid 82887] [remote 127.0.0.1:41112] File "/opt/python/3.9/lib/python3.9/importlib/util.py", line 94, in find_spec [2024/04/08 18:12:55.775] [Mon Apr 08 23:12:55.774187 2024] [wsgi:error] [pid 82887] [remote 127.0.0.1:41112] parent = __import__(parent_name, fromlist=['__path__']) [2024/04/08 18:12:55.775] [Mon Apr 08 23:12:55.774194 2024] [wsgi:error] [pid 82887] [remote 127.0.0.1:41112] ModuleNotFoundError: No module named 'dns'