Skip to content
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

Error when running your quick start example #35

Closed
DamienIrving opened this issue Aug 25, 2022 · 3 comments
Closed

Error when running your quick start example #35

DamienIrving opened this issue Aug 25, 2022 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@DamienIrving
Copy link

I tried to run the quick start example on your website and got an error when trying to plot the diagnostics.

You can view the error in the following notebook:
https://github.com/climate-resilient-enterprise/frequency-analysis/blob/master/examples/pyextremes_example.ipynb

It was run on Rocky Linux 8.6, with pyextremes version 2.2.4 and python version 3.10.5.

@DamienIrving DamienIrving added the bug Something isn't working label Aug 25, 2022
@georgebv
Copy link
Owner

This looks like a bug with matplotlib and not with pyextremes - the error occurs when figure is created. Try running the following code and post here what happens:

import matplotlib.pyplot as plt
plt.figure(figsize=(5,5), dpi=96)

I would also like to know how you installed pyextremes - looks like miniconda. Can you share your python environment (output of conda list command)? I'd like to see versions of all packages you have there.

@DamienIrving
Copy link
Author

DamienIrving commented Aug 26, 2022

Thanks for the prompt to run conda list.

When I ran your quick start example on my linux machine in an existing conda environment (which threw the error I shared and give the same error for plt.figure(figsize=(5,5), dpi=96)), conda list showed the following versions of matplotlib were installed:

matplotlib-base          3.5.3             py310h78c5c2f_2    conda-forge
matplotlib-inline         0.1.5              pyhd8ed1ab_0         conda-forge

I then created a fresh environment with just pyextremes and jupyter installed (conda create -n pyextreme jupyter pyextremes) and the quick start example worked just fine. This time conda list showed:

matplotlib-base          3.5.3             py310h78c5c2f_2    conda-forge
matplotlib-inline         0.1.6              pyhd8ed1ab_0         conda-forge

I therefore ran conda update matplotlib-inline in my existing conda environment, which fixed the error I shared with you.

I wonder whether in the conda package for pyextremes you could require matplotlib-inline >= 1.6? That might prevent anyone else having this same problem.

Thanks again for your help.

@georgebv
Copy link
Owner

Glad it worked out for you. matplotlib-inline is a jupyter dependency and is not related to pyextremes (even though it's convenient to use in jupyter).

This was a bug with that specific version (0.1.5) of matplotlib-inline: ipython/matplotlib-inline#19, so I'm closing this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants