KeyError: 'status' when trying to schedule spider
评估
调研方向
阅读 scrapinghub/legacy.py,尤其是 _request 和 _decode_response,然后使用版本 2.3.1 复现 spider 调度。检查缺少 status 的 JSON 响应,并追踪它是如何生成的;当调度失败得到解释且错误路径由 repository 现有的测试覆盖时,即视为完成。
由索引模型根据 Issue 内容生成。
描述
I am getting this error when trying to schedule a spider. This is happening with version 2.3.1
Traceback (most recent call last):
File "/home/molveyra/.local/share/virtualenvs/mollie-AtuAN_AE/lib/python3.8/site-packages/scrapinghub/legacy.py", line 157, in _decode_response
if data['status'] == 'ok':
KeyError: 'status'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/molveyra/.local/share/virtualenvs/mollie-AtuAN_AE/lib/python3.8/site-packages/scrapinghub/client/exceptions.py", line 69, in wrapped
return method(*args, **kwargs)
File "/home/molveyra/.local/share/virtualenvs/mollie-AtuAN_AE/lib/python3.8/site-packages/scrapinghub/client/__init__.py", line 19, in _request
return super(Connection, self)._request(*args, **kwargs)
File "/home/molveyra/.local/share/virtualenvs/mollie-AtuAN_AE/lib/python3.8/site-packages/scrapinghub/legacy.py", line 143, in _request
return self._decode_response(response, format, raw)
File "/home/molveyra/.local/share/virtualenvs/mollie-AtuAN_AE/lib/python3.8/site-packages/scrapinghub/legacy.py", line 169, in _decode_response
raise APIError("JSON response does not contain status")
scrapinghub.legacy.APIError: JSON response does not contain status
- 主要语言
- Python
- 星标
- 204
- 派生
- 62
- 平均合并
- 6 分钟
- 30 天内合并 PR
- 2
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
scrapinghub/python-scrapinghub 的其他 Issue
-
Incorrect information for Samples in Job documentation可能已有人在做 @AdrianAtZyte 于 66 天前认领。 未关闭
难度 1/5 1 小时以内 新手友好度 72/100
-
Zyte Job API: Provision to support Cron Expression or Time Interval可能已有人在做 @AdrianAtZyte 于 67 天前认领。 未关闭
难度 5/5 一周以上 新手友好度 25/100
-
Add async support可能重新可做 @VMRuiz 于 1414 天前认领,目前没有进行中的 PR。 未关闭
scrapinghub/python-scrapinghub#169 · 8 条评论 · 2 个 reaction · 已指派 4 人 ·
-
Add retry logic to Job Tag Update function可能已有人在做 @AdrianAtZyte 于 66 天前认领。 未关闭
难度 3/5 1-2 天 新手友好度 42/100
-
collections.get_store is not working as documented可能已有人在做 @AdrianAtZyte 于 64 天前认领。 未关闭bug docs
难度 3/5 1-2 天 新手友好度 45/100
查看 scrapinghub/python-scrapinghub 的全部 Issue
相似的 Issue
-
[19.0] pos_sale: settling an order with a 0 down payment line crashes (reading 'reward_id') and leaves a wrong amount due可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 2/5 1-3 小时 新手友好度 79/100
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 79/100
developmentseed/titiler-covjson#164 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 82/100
awslabs/visual-asset-management-system#2164 ·
维护者通常 1 天内回复
-
needs-triage
难度 2/5 1-3 小时 新手友好度 86/100
MakazhanAlpamys/Soup#3589 ·
维护者通常 1 天内回复
-
channels status reports the wrong Enabled value for Feishu instances and default-enabled WebSocket未关闭
难度 2/5 1-3 小时 新手友好度 86/100
维护者通常 1 天内回复