qatrackplus / qatrackplus

QATrack+ is an open source program for managing the quality control program of radiotherapy and diagnostic imaging clinics.
Other
56 stars 24 forks source link

ImportError: DLL load failed while importing _openssl: The specified module could not be found. #590

Closed hyaochn closed 1 year ago

hyaochn commented 3 years ago

Hi All,

Following the instruction @ https://docs.qatrackplus.com/en/stable/install/win.html Successfully run the SQL Server Successfully run the QATrack31cherryPyService But after I open localhost:8008 in the browser (chrome & edge), it shows the error "This page isn’t working right now". Then I see the following message in cherry_py_err

Traceback (most recent call last): File "C:\QATrack+\venvs\qatrackplus\lib\site-packages\django\core\handlers\exception.py", line 34, in inner response = get_response(request) File "C:\QATrack+\venvs\qatrackplus\lib\site-packages\django\core\handlers\base.py", line 100, in _get_response resolver_match = resolver.resolve(request.path_info) File "C:\QATrack+\venvs\qatrackplus\lib\site-packages\django\urls\resolvers.py", line 536, in resolve for pattern in self.url_patterns: File "C:\QATrack+\venvs\qatrackplus\lib\site-packages\django\utils\functional.py", line 80, in get res = instance.dict[self.name] = self.func(instance) File "C:\QATrack+\venvs\qatrackplus\lib\site-packages\django\urls\resolvers.py", line 584, in url_patterns patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module) File "C:\QATrack+\venvs\qatrackplus\lib\site-packages\django\utils\functional.py", line 80, in get res = instance.dict[self.name] = self.func(instance) File "C:\QATrack+\venvs\qatrackplus\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 "", line 1030, in _gcd_import File "", line 1007, in _find_and_load File "", line 986, in _find_and_load_unlocked File "", line 680, in _load_unlocked File "", line 790, in exec_module File "", line 228, in _call_with_frames_removed File "C:\QATrack+\qatrack\urls.py", line 34, in url(r'^accounts/', include('qatrack.accounts.urls')), File "C:\QATrack+\venvs\qatrackplus\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 "", line 1030, in _gcd_import File "", line 1007, in _find_and_load File "", line 986, in _find_and_load_unlocked File "", line 680, in _load_unlocked File "", line 790, in exec_module File "", line 228, in _call_with_frames_removed File "C:\QATrack+\qatrack\accounts\urls.py", line 6, in from qatrack.accounts import views File "C:\QATrack+\qatrack\accounts\views.py", line 19, in from django_auth_adfs.views import OAuth2CallbackView File "C:\QATrack+\venvs\qatrackplus\lib\site-packages\django_auth_adfs\views.py", line 10, in from django_auth_adfs.config import provider_config, settings File "C:\QATrack+\venvs\qatrackplus\lib\site-packages\django_auth_adfs\config.py", line 10, in from cryptography.hazmat.backends.openssl.backend import backend File "C:\QATrack+\venvs\qatrackplus\lib\site-packages\cryptography\hazmat\backends\openssl\init__.py", line 6, in from cryptography.hazmat.backends.openssl.backend import backend File "C:\QATrack+\venvs\qatrackplus\lib\site-packages\cryptography\hazmat\backends\openssl\backend.py", line 113, in from cryptography.hazmat.bindings.openssl import binding File "C:\QATrack+\venvs\qatrackplus\lib\site-packages\cryptography\hazmat\bindings\openssl\binding.py", line 14, in from cryptography.hazmat.bindings._openssl import ffi, lib ImportError: DLL load failed while importing _openssl: The specified module could not be found.

pyopenssl: 21.0.0 cryptography: 3.4.8 python: 3.9.1 windows 10

Not sure which DLLs are missing and what's those DLL files? Any help is appreciated.

Thank you.

randlet commented 1 year ago

Not sure exactly what the issue is here but StackOverflow (https://stackoverflow.com/a/54389947/79802) suggests reinstalling a few libraries:

pip uninstall cryptography
pip uninstall pyasn1
pip install pyopenssl
pip install cryptography
pip install pyasn1