Skip to content

TypeError: json.loads() used incorrectly on dictionary returned by requests.get().json() in API calls #37

@GlenM42

Description

@GlenM42

I tried to use the library for my project by following the guide in README file, and it did not go well from the start:

pic

The code mistakenly attempts to parse a dictionary returned by requests.get(url).json() using json.loads(), which leads to a TypeError. The error message states that the JSON object must be a string, bytes, or bytearray, but a dictionary was provided instead. This issue occurs in the list_jurisdictions, get_jurisdictions, and get_values methods

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions