Skip to content

complicated jsonschema and importlib_metadata co-dependencies #648

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
gtsambos opened this issue May 26, 2020 · 5 comments
Closed

complicated jsonschema and importlib_metadata co-dependencies #648

gtsambos opened this issue May 26, 2020 · 5 comments
Assignees
Milestone

Comments

@gtsambos
Copy link
Member

When I fetched the code on the master branch and attempted to run some of the tests in python/tests, I kept getting this error (even after ensuring that the modules in requirements.txt were all installed and the git submodules were up to date)

AttributeError: module 'jsonschema' has no attribute 'validators'

Doing some Googling, I learn that 'validators' have only been part of jsonschema since version 3.2.0 (see here), so I installed the latest version of jsonschema with pip (v 3.3.0). But this time, I get a different error when I run a Python test:

  File "/miniconda3/lib/python3.7/site-packages/jsonschema/__init__.py", line 33, in <module>
    import importlib_metadata as metadata
ModuleNotFoundError: No module named 'importlib_metadata'

This is odd, since the module is definitely installed. Some brief googling indicates that this error message might be related to jsonschema as well.

Anyway, I don't entirely know what the solution is, but I thought I'd flag it as a problem! At the very least, there should be specific versions of jsonschema specified in development.txt.

(also btw, when I upgraded jsonschema, I got the following warning. I don't know if it's related to this problem or not)

Successfully built pyrsistent
ERROR: python-jsonschema-objects 0.3.5 has requirement jsonschema~=2.3, but you'll have jsonschema 3.2.0 which is incompatible.
@jeromekelleher
Copy link
Member

This does look weird. We should definitely pin the version of jsonschema both in requirements.txt and in setup.py. If it's a new version that causes issues we should consider using the features.

@benjeffery
Copy link
Member

@gtsambos can you try using the requirements file in requirements/CI?

@jeromekelleher
Copy link
Member

@gtsambos, any update on this one, or do you think we can close the issue?

@gtsambos
Copy link
Member Author

gtsambos commented Jul 1, 2020

Hi @jeromekelleher @benjeffery, sorry for leaving this hanging, I just forgot about it! I haven't been using the computer that I had this issue on for a little while, but will be getting it back at the end of this week -- I will check up on this again then.

@jeromekelleher
Copy link
Member

Closing this one, as it seems likely it was a problem in the environment for the machine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants