Closed usox closed 8 years ago
Hi, with a standard configuration I'm encountering no issues with supplied CherryPy, both Python 2.x and 3.x don't throw any exceptions. Do you have further steps to reproduce your problem? I've got but one idea:
As I see, you've tried to use port 80 for my application, which may have caused this problem. On my test systems everything is fine as long as I'm using port 8030 but switching to 80 throws an exception:
Both exceptions are legit, as both systems reserve their port 80 for other services.
P.S. Sadly, an exception on start won't let you change your port back. To get over this, you must delete the file "settings.db" in the application folder. This will also delete channels and recordings! If you want to keep your data, you can connect to this file using SQLite driver and change it manually or send me your file via E-Mail.
The issue is not related to the port configuration. For testing purposes, I created a fresh linux VM (ubuntu 14.04), downloaded the 1.2.0 package and ran it using python2.7 - same result.
The import of the is_closeable_iterator
in cherrypy/_cpwsgi.py:16
fails because of the missing definition (see https://github.com/cherrypy/cherrypy/blob/master/cherrypy/lib/__init__.py vs https://github.com/Pavion/tvstreamrecord/blob/master/cherrypy/lib/__init__.py)
Starting tvstreamrecord v.1.2.0 with Python 2.7
Logging output initialized
Initializing database...
New database created. Thank you for using this package.
Initializing config...
Checking internationalization...
Initializing records...
Initializing EPG import thread...
Starting server on: 0.0.0.0:8030
Traceback (most recent call last):
File "tvstreamrecord.py", line 1163, in <module>
run(host=config.cfg_server_bind_address, port=config.cfg_server_port, server=CherryPyServer, quiet=True)
File "/home/wolverine/aggi/tvstreamrecord-1.2.0/bottle.py", line 3026, in run
server.run(app)
File "/home/wolverine/aggi/tvstreamrecord-1.2.0/bottle.py", line 2666, in run
from cherrypy import wsgiserver
File "/home/wolverine/aggi/tvstreamrecord-1.2.0/cherrypy/__init__.py", line 76, in <module>
from cherrypy import _cptree
File "/home/wolverine/aggi/tvstreamrecord-1.2.0/cherrypy/_cptree.py", line 7, in <module>
from cherrypy import _cpconfig, _cplogging, _cprequest, _cpwsgi, tools
File "/home/wolverine/aggi/tvstreamrecord-1.2.0/cherrypy/_cpwsgi.py", line 16, in <module>
from cherrypy.lib import is_closable_iterator
ImportError: cannot import name is_closable_iterator
I've implemented a fix for dead servers (855ab0331a4ebde3043c482e5eff2b2dc26bf16c). Getting an exception on server start should now load a default server 0.0.0.0:8030 instead.
Sorry, it seems, my 'lib' folder was excluded from all commits (52f6dc553fae153c7e048c3b5055d072cfd062d6). Thanks for waking me up! Please test and close this issue, if successful.
Seems to work as expected ;)
It looks like the shipped cherrypy library is missing at least the
is_closeable_iterator
definition.Error:
Missing code in the shipped
__init.py__
(diffed against cherrypy 3.8.1)