基本上都是正常操作:启动 Scrapyd 服务,修改.cfg 文件,curl 操作 API,然后就出现了如下的 Bug(我在命令行粘贴下来的):
2019-04-06T16:31:57+0800 [_GenericHTTPChannelProtocol,35,127.0.0.1] Unhandled Error
Traceback (most recent call last):
File "c:\users\northxw\appdata\local\programs\python\python36\lib\site-packages\twisted\web\http.py", line 2190, in allContentReceived
req.requestReceived(command, path, version)
File "c:\users\northxw\appdata\local\programs\python\python36\lib\site-packages\twisted\web\http.py", line 917, in requestReceived
self.process()
File "c:\users\northxw\appdata\local\programs\python\python36\lib\site-packages\twisted\web\server.py", line 199, in process
self.render(resrc)
File "c:\users\northxw\appdata\local\programs\python\python36\lib\site-packages\twisted\web\server.py", line 259, in render
body = resrc.render(self)
--- <exception caught here> ---
File "c:\users\northxw\appdata\local\programs\python\python36\lib\site-packages\scrapyd\webservice.py", line 21, in render
return JsonResource.render(self, txrequest).encode('utf-8')
File "c:\users\northxw\appdata\local\programs\python\python36\lib\site-packages\scrapyd\utils.py", line 20, in render
r = resource.Resource.render(self, txrequest)
File "c:\users\northxw\appdata\local\programs\python\python36\lib\site-packages\twisted\web\resource.py", line 249, in render
raise UnsupportedMethod(allowedMethods)
twisted.web.error.UnsupportedMethod: Expected one of [b'HEAD', b'object', b'POST']
看错误提示,我进入相关文件查看后,找不出异样(emmm......承认自己处理问题的能力), 不知道大家有没有遇到过相同的问题。
这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。
V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。
V2EX is a community of developers, designers and creative people.