Skip to content

nox -e _recipe_name can crash with JSONDecodeError if conda prints warnings #228

@venkatkapil24

Description

@venkatkapil24

It runs conda _____ --json --dry-run and expects clean JSON, but if Conda prints any warning, nox mixes warning text with JSON and json.loads() fails. The error message is generic and doesn't point to an underlying conda "issue".

The fix is easy. Add to the following line

https://github.com/venkatkapil24/atomistic-cookbook/blob/7dc41a2a0cbde10b00609d0b14cc5b29b1974739/noxfile.py#L363

stderr=subprocess.PIPE,
this ensures the output is a json.

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