Skip to content

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

Description

@johnmhoran

Working on the metadata, urls and versions PURL CLI commands (see #247),

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions