scrapy / scrapyd

A service daemon to run Scrapy spiders
https://scrapyd.readthedocs.io/en/stable/
BSD 3-Clause "New" or "Revised" License
2.96k stars 569 forks source link

start scrapyd error #333

Closed xudun closed 5 years ago

xudun commented 5 years ago

Unhandled Error Traceback (most recent call last): File "/usr/local/python3/lib/python3.7/site-packages/Twisted-19.2.0-py3.7-linux-x86_64.egg/twisted/application/app.py", line 674, in run runApp(config) File "/usr/local/python3/lib/python3.7/site-packages/Twisted-19.2.0-py3.7-linux-x86_64.egg/twisted/scripts/twistd.py", line 25, in runApp runner.run() File "/usr/local/python3/lib/python3.7/site-packages/Twisted-19.2.0-py3.7-linux-x86_64.egg/twisted/application/app.py", line 381, in run self.application = self.createOrGetApplication() File "/usr/local/python3/lib/python3.7/site-packages/Twisted-19.2.0-py3.7-linux-x86_64.egg/twisted/application/app.py", line 453, in createOrGetApplication application = getApplication(self.config, passphrase) --- --- File "/usr/local/python3/lib/python3.7/site-packages/Twisted-19.2.0-py3.7-linux-x86_64.egg/twisted/application/app.py", line 464, in getApplication application = service.loadApplication(filename, style, passphrase) File "/usr/local/python3/lib/python3.7/site-packages/Twisted-19.2.0-py3.7-linux-x86_64.egg/twisted/application/service.py", line 416, in loadApplication application = sob.loadValueFromFile(filename, 'application') File "/usr/local/python3/lib/python3.7/site-packages/Twisted-19.2.0-py3.7-linux-x86_64.egg/twisted/persisted/sob.py", line 177, in loadValueFromFile eval(codeObj, d, d) File "/usr/local/python3/lib/python3.7/site-packages/scrapyd/txapp.py", line 3, in application = get_application() File "/usr/local/python3/lib/python3.7/site-packages/scrapyd/init.py", line 15, in get_application return appfunc(config) File "/usr/local/python3/lib/python3.7/site-packages/scrapyd/app.py", line 39, in application webservice = TCPServer(http_port, server.Site(webcls(config, app)), interface=bind_address) File "/usr/local/python3/lib/python3.7/site-packages/scrapyd/website.py", line 33, in init servCls = load_object(servClsName) File "/usr/local/python3/lib/python3.7/site-packages/scrapy/utils/misc.py", line 49, in load_object raise NameError("Module '%s' doesn't define any object named '%s'" % (module, name)) builtins.NameError: Module 'scrapyd.webservice' doesn't define any object named 'DaemonStatu'

my8100 commented 5 years ago
builtins.NameError: Module 'scrapyd.webservice' doesn't define any object named 'DaemonStatu'

Maybe you should check out the config file of Scrapyd and change DaemonStatu to DaemonStatus.

daemonstatus.json = scrapyd.webservice.DaemonStatus
my8100 commented 5 years ago

BTW, run pip install -U Twisted==18.9.0 if Scrapyd was installed via pip, see #311.

xudun commented 5 years ago

@my8100 it worked,thanks for your help!