aboutcode-org / aboutcode-org/purldb

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

Abierto
#311 2 comentarios 0 reacciones 0 asignados Ver en GitHub
bug
Lenguaje dominante
HTML
Estrellas
67
Forks
69
Merge medio
8 d 8 h
PR fusionados (30 d)
1

Descripción

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

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.