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 摘要。