janeczku / calibre-web

:books: Web app for browsing, reading and downloading eBooks stored in a Calibre database
GNU General Public License v3.0
13.07k stars 1.39k forks source link

Manual installation on Windows: ImportError: cannot import name 'bind_unix_socket' #2973

Closed andrewchenshx closed 4 months ago

andrewchenshx commented 10 months ago

Describe the bug/problem following the instruction of this page https://github.com/janeczku/calibre-web/wiki/Manual-installation to install on Windows, the error is as following: ModuleNotFoundError: No module named 'gevent'

To Reproduce python cps.py

Expected behavior no errors

Screenshots

Traceback (most recent call last):
  File "C:\Users\Andrew\Documents\GitHub\calibre-web\cps\server.py", line 27, in <module>
    from gevent.pywsgi import WSGIServer
ModuleNotFoundError: No module named 'gevent'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\Andrew\Documents\GitHub\calibre-web\cps.py", line 28, in <module>
    from cps.main import main
  File "C:\Users\Andrew\Documents\GitHub\calibre-web\cps\__init__.py", line 36, in <module>
    from .server import WebServer
  File "C:\Users\Andrew\Documents\GitHub\calibre-web\cps\server.py", line 40, in <module>
    from tornado.netutil import bind_unix_socket
ImportError: cannot import name 'bind_unix_socket' from 'tornado.netutil' (C:\Users\Andrew\py_envs\py310_calibre\lib\site-packages\tornado\netutil.py)

Environment (please complete the following information):

Additional context

OzzieIsaacs commented 10 months ago

Upps, forgot something

andrewchenshx commented 10 months ago

gevent should be added to requirements.txt. manually pip install gevent, then starts w/o errors.

OzzieIsaacs commented 10 months ago

Please update to the newest commit version, should work afterwards

OzzieIsaacs commented 10 months ago

Calibre-web supports 2 servers Gevent and Tornado, Tornado is the default one. Gevent is therefore listed in the optional-requirements.txt. The error is only in the Tornado part and only on Windows and is now fixed.