Skip to content

json.decoder.JSONDecodeError #5

Description

@dan0x1

When running porch-pirate with the --dump flag, the script crashes with a json.decoder.JSONDecodeError. The error occurs specifically when attempting to query certain workspaces (in my case, for the keyword "rappi").

Possible cause:
It seems porchpirate.collections(w) is returning an empty string or invalid JSON, which is passed directly to json.loads() without checking. This causes the script to crash.

Suggested fix:
Check if the result is empty or not valid JSON before trying to parse it with json.loads().

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions