Skip to content

RefResolver breaks on file:// URIs #478

@afaulconbridge

Description

@afaulconbridge

When using a file:// in a RefResolver to resolve relative URI references it fails with:

jsonschema.exceptions.RefResolutionError: addinfourl instance has no attribute '__exit__'

This is because urllib.urlopen() can't be used in a with clause - see https://stackoverflow.com/questions/30627937/traceback-attributeerroraddinfourl-instance-has-no-attribute-exit for details.

I can create a minimal example if needed, and I'll submit a pull request for the fix.

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