aboutcode-org / aboutcode-org/purldb

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

Offen
#311 2 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
bug
Vorherrschende Sprache
HTML
Sterne
67
Forks
69
Ø Merge
8 T. 8 Std.
Gemergte PRs (30 T.)
1

Beschreibung

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.)

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.