aboutcode-org / aboutcode-org/purldb

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

Open
#311 2 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
HTML
Stars
67
Forks
69
Avg merge
8d 8h
Merged PRs (30d)
1

Description

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

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.