Can't find "_rust" module?

3,851 views
Skip to first unread message

Mike B

unread,
Mar 30, 2022, 11:11:54 AM3/30/22
to QATrack+
Hi, I thought I had done everything correctly for my Win2019 server install... got the cherrypy service running, IIS and the database configured.  I can access the linux penguin for the static files and when going to localhost it redirects to the login page (http://localhost/accounts/login/?next=/) but I get an error 500 on it.

Below is the full error.  Attached is the whole file.  I'm not a python person so I tried a few guesses but nothing seems to help.  Tried a reboot or 2 as well.  Any suggestions?

Thanks

[29/Mar/2022:15:38:51] ENGINE ImportError('DLL load failed while importing _rust: The specified module could not be found.')
Traceback (most recent call last):
  File "C:\deploy\venvs\qatrack31\lib\site-packages\django\core\handlers\exception.py", line 34, in inner
    response = get_response(request)
  File "C:\deploy\venvs\qatrack31\lib\site-packages\django\core\handlers\base.py", line 100, in _get_response
    resolver_match = resolver.resolve(request.path_info)
  File "C:\deploy\venvs\qatrack31\lib\site-packages\django\urls\resolvers.py", line 536, in resolve
    for pattern in self.url_patterns:
  File "C:\deploy\venvs\qatrack31\lib\site-packages\django\utils\functional.py", line 80, in __get__
    res = instance.__dict__[self.name] = self.func(instance)
  File "C:\deploy\venvs\qatrack31\lib\site-packages\django\urls\resolvers.py", line 584, in url_patterns
    patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
  File "C:\deploy\venvs\qatrack31\lib\site-packages\django\utils\functional.py", line 80, in __get__
    res = instance.__dict__[self.name] = self.func(instance)
  File "C:\deploy\venvs\qatrack31\lib\site-packages\django\urls\resolvers.py", line 577, in urlconf_module
    return import_module(self.urlconf_name)
  File "C:\Program Files\Python39\lib\importlib\__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 850, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "C:\deploy\qatrackplus\qatrack\urls.py", line 34, in <module>
    url(r'^accounts/', include('qatrack.accounts.urls')),
  File "C:\deploy\venvs\qatrack31\lib\site-packages\django\urls\conf.py", line 34, in include
    urlconf_module = import_module(urlconf_module)
  File "C:\Program Files\Python39\lib\importlib\__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 850, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "C:\deploy\qatrackplus\qatrack\accounts\urls.py", line 6, in <module>
    from qatrack.accounts import views
  File "C:\deploy\qatrackplus\qatrack\accounts\views.py", line 19, in <module>
    from django_auth_adfs.views import OAuth2CallbackView
  File "C:\deploy\venvs\qatrack31\lib\site-packages\django_auth_adfs\views.py", line 10, in <module>
    from django_auth_adfs.config import provider_config, settings
  File "C:\deploy\venvs\qatrack31\lib\site-packages\django_auth_adfs\config.py", line 10, in <module>
    from cryptography.hazmat.backends.openssl.backend import backend
  File "C:\deploy\venvs\qatrack31\lib\site-packages\cryptography\hazmat\backends\openssl\__init__.py", line 6, in <module>
    from cryptography.hazmat.backends.openssl.backend import backend
  File "C:\deploy\venvs\qatrack31\lib\site-packages\cryptography\hazmat\backends\openssl\backend.py", line 13, in <module>
    from cryptography import utils, x509
  File "C:\deploy\venvs\qatrack31\lib\site-packages\cryptography\x509\__init__.py", line 6, in <module>
    from cryptography.x509 import certificate_transparency
  File "C:\deploy\venvs\qatrack31\lib\site-packages\cryptography\x509\certificate_transparency.py", line 10, in <module>
    from cryptography.hazmat.bindings._rust import x509 as rust_x509
cherry_py_err.log

Randle Taylor

unread,
Apr 13, 2022, 8:29:54 PM4/13/22
to QATrack+
Hi Mike,

Sorry, I missed this posting.  Did you have any luck?

I'm not sure what caused the issue is, but something has gone wrong with the cryptography library. You could try uninstalling/reinstalling the cryptography library.  Activate the virtualenv,  then run
pip uninstall cryptography
pip install --upgrade pip
pip install cryptography

then restart the WIndows Service and try to load a page again.

Randy
Reply all
Reply to author
Forward
0 new messages