Skip to content

RefResolver breaks on file:// URIs #478

Closed

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.

Activity

  1. Julian commented on Oct 22, 2018

    @Julian
    Member

    Hi, when filing issues please always include what version you're on (and a minimal reproducer yeah), but this sounds like #472, which is fixed on master, though looks like not in an alpha release yet -- what version are you on?

  2. Julian commented on Oct 25, 2018

    @Julian
    Member

    I think the above is the case, but if not lemme know and happy to have another look!

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions