mar10 / wsgidav

A generic and extendable WebDAV server based on WSGI
https://wsgidav.readthedocs.io
MIT License
976 stars 150 forks source link

Windows MSI installer error #278

Open lupohan44 opened 1 year ago

lupohan44 commented 1 year ago

Describe the bug Cannot run wsgidav with auth=nt

To Reproduce Steps to reproduce the behavior:

  1. Use MSI installer to install wsgidav on windows
  2. Execute wsgidav -p 16147 --host=0.0.0.0 --root=D:/ --auth=nt
  3. See error

Running without configuration file. 17:30:28.087 - ERROR : Dynamic import of 'wsgidav.dc.nt_dc.NTDomainController' failed: No module named 'win32net' Traceback (most recent call last): File "C:\prj\git\wsgidav.tox\bdist_msi\Lib\site-packages\cx_Freeze\initscripts__startup.py", line 138, in run File "C:\prj\git\wsgidav.tox\bdist_msi\Lib\site-packages\cx_Freeze\initscripts\console.py", line 16, in run File "wsgidav\server\server_cli.py", line 841, in File "wsgidav\server\server_cli.py", line 803, in run File "C:\prj\git\wsgidav\wsgidav\wsgidav_app.py", line 247, in init File "C:\prj\git\wsgidav\wsgidav\http_authenticator.py", line 143, in init__ File "C:\prj\git\wsgidav\wsgidav\http_authenticator.py", line 108, in make_domain_controller File "C:\prj\git\wsgidav\wsgidav\util.py", line 530, in dynamic_import_class File "C:\Users\marti\AppData\Local\Programs\Python\Python39\lib\importlib__init__.py", line 127, in import_module 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 850, in exec_module File "", line 228, in _call_with_frames_removed File "C:\prj\git\wsgidav\wsgidav\dc\nt_dc.py", line 78, in ModuleNotFoundError: No module named 'win32net'

Expected behavior Run normally

Screenshots, Log-Files, Stacktrace

Running without configuration file.
17:30:28.087 - ERROR   : Dynamic import of 'wsgidav.dc.nt_dc.NTDomainController' failed: No module named 'win32net'
Traceback (most recent call last):
  File "C:\prj\git\wsgidav\.tox\bdist_msi\Lib\site-packages\cx_Freeze\initscripts\__startup__.py", line 138, in run
  File "C:\prj\git\wsgidav\.tox\bdist_msi\Lib\site-packages\cx_Freeze\initscripts\console.py", line 16, in run
  File "wsgidav\server\server_cli.py", line 841, in <module>
  File "wsgidav\server\server_cli.py", line 803, in run
  File "C:\prj\git\wsgidav\wsgidav\wsgidav_app.py", line 247, in __init__
  File "C:\prj\git\wsgidav\wsgidav\http_authenticator.py", line 143, in __init__
  File "C:\prj\git\wsgidav\wsgidav\http_authenticator.py", line 108, in make_domain_controller
  File "C:\prj\git\wsgidav\wsgidav\util.py", line 530, in dynamic_import_class
  File "C:\Users\marti\AppData\Local\Programs\Python\Python39\lib\importlib\__init__.py", line 127, in import_module
  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:\prj\git\wsgidav\wsgidav\dc\nt_dc.py", line 78, in <module>
ModuleNotFoundError: No module named 'win32net'

If applicable, add screenshots to help explain your problem. If applicable, add a log file (consider --verbose).

Environment:

WsgiDAV/4.1.0 Python/3.9.9(64 bit) Windows-10-10.0.17763
Python from: C:\Users\Administrator\AppData\Local\Programs\WsgiDAV\wsgidav.exe
github-actions[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] commented 9 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] commented 6 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

mar10 commented 5 months ago

Still fails with 4.3.2

mar10 commented 5 months ago

Trying with Python 3.12, Pywin32 306, and cx_Freeze 7.0.0 I still get this error:

setup_bdist_msi.py already adds wsgidav.dc.nt_dc to the requirements and python setup_bdist_msi.py bdist_msi builds an exe folder that contains build\exe.win-amd64-3.12\lib\win32net.pyd.

Still, import win32net raises an ImportError.

github-actions[bot] commented 2 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Tlntin commented 2 months ago

pip install pywin32 , work well.