aboutcode-org / aboutcode-org/purldb

Occasional errors accessing 'validate' endpoint and fetchcode/package_versions.py versions()/get_response()

未关闭
#311 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
bug
主要语言
HTML
星标
67
派生
69
平均合并
8 天 8 小时
30 天内合并 PR
1

描述

Working on the `metadata`, `urls` and `versions` PURL CLI commands (see https://github.com/nexB/purldb/issues/247),

- I occasionally get errors when trying to validate a PURL -- often a `pkg:deb/debian/2ping` (or similar deb/debian) that I'm testing at the time -- with the `validate` endpoint.
- With `versions`, I occasionally get a fetchcode/package_versions.py `Error while fetching` error that seems generated by https://github.com/nexB/fetchcode/blob/master/src/fetchcode/package_versions.py#L512-L534.

I'll add two files that contain examples for `metadata` and `versions` in which I ran the same command twice, separated by just a few seconds, and one threw an error while the other ran w/o error. I'm catching and printing `response`, `response.text` and `response.json()` values via my try/except to aid in the troubleshooting.

Before I began to catch the errors, my two most popular were `TypeError: 'NoneType' object is not subscriptable` and `json.decoder.JSONDecodeError: Expecting value: line 2 column 1 (char 1)`. (Lots of google results for char0 but few for char 1, which some suggest means HTML received when JSON was expected. My file examples will show an incoming HTML conveying a Server 500 error, which might be related.)

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。