-
Notifications
You must be signed in to change notification settings - Fork 128
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
export
crashes with KeyError: 'tree'
when jsonschema v4 is installed
#1358
Comments
Yep. I suggested the newer APIs in the work which added the older API usage. |
It's worth noting that installation of other packages in the same environment can pull in
I've seen this happen a few times recently, with Latch in the example above and today in an internal Slack thread. Both scenarios were surfaced to devs because they resulted in an error, not just a deprecation warning:
|
Yep I've also gotten errors in the past but I didn't mention them here because I thought it was "user error" - i.e. if I were to use the official nextstrain environments and not custom install various things I would not have encountered the error. And technically, there's nothing wrong with the But agreed that it'd be good to move to v4, after all I made this issue :) |
Agreed that this is not an Augur bug! While it would be nice to have everyone use the official Nextstrain environments (managed runtimes), in practice we have many users (both internal and external) that custom install things and will face this error. With the error messages alone, it's easy to think that something is wrong with the file or Augur's code, though in the end it's just due to having a newer version of |
On Slack, @jameshadfield and @joverlee521 uncovered that
|
This was brought up again on Slack - seems like |
This was reported again in #1461. I've updated the issue with a more comprehensive description and workarounds. |
I wonder if a quick-and-dirty improvement here (until the work can be done to update to the new API) would be to version-detect |
Added as a solution in the issue description. |
I just ran into this issue, too, trying to run FROM nextstrain/base
RUN pip3 install seaborn notebook altair[all] \
&& rm -rf ~/.cache Another realistic (not ideal) user workaround is to add +1 for supporting version 4 of jsonschema, though. |
I'll take a look at upgrading jsonschema usage to work with v4. If it's easy, we should just do it. If it's difficult and requires extensive testing, I think the comprehensive quick-and-dirty improvement is to detect jsonschema v4 and error with a suggestion to re-run with |
Thank you, @victorlin! |
export
crashes with KeyError: 'tree'
when jsonschema v4 is installed
Description
Augur pins jsonschema to version 3 in setup.py and Bioconda recipe as current code does not work with jsonschema version 4.
Despite those declared version constraints, we've had numerous reports from users ending up with jsonschema version 4 and running into errors. This can happen in a Conda environment if Augur is first installed through Bioconda then other Python packages are installed using
pip
. If the Python package requested depends on jsonschema somewhere in the dependency tree,pip
ignores Biopython version constraints and will resolve to the latest version of jsonschema supported by the dependency tree.This is not a great experience for users who are managing their own environments and do something like
pip install jupyter
(not uncommon for our users), then run into the cryptic error below.Errors/warnings when Augur is used with jsonschema version 4
KeyError: 'tree'
Deprecations
User workarounds
Developer solutions
The text was updated successfully, but these errors were encountered: