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

Possible import issue #358

Open
mdip226 opened this issue Jul 25, 2023 · 1 comment
Open

Possible import issue #358

mdip226 opened this issue Jul 25, 2023 · 1 comment

Comments

@mdip226
Copy link

mdip226 commented Jul 25, 2023

While running Start_here.ipynb, an import error arose:

Cell In[6], line 1
----> 1 results.plot_species(
      2     # Set the target species to visualize
      3     species='Rabbits',
      4     
      5     # Set to True to use Plotly animation
      6     animated=True,
      7     
      8     # Set the size of the Particles
      9     size=20
     10 )

File [~/SpatialPy/spatialpy/core/result.py:599](https://file+.vscode-resource.vscode-cdn.net/home/mdip/SpatialPy/examples/~/SpatialPy/spatialpy/core/result.py:599), in Result.plot_species(self, species, t_ndx, t_val, concentration, deterministic, width, height, colormap, size, title, animated, t_ndx_list, speed, f_duration, t_duration, return_plotly_figure, use_matplotlib, debug)
    597     return fig
    598 init_notebook_mode()
--> 599 iplot(fig)

File [~/SpatialPy/env/lib/python3.11/site-packages/plotly/offline/offline.py:392](https://file+.vscode-resource.vscode-cdn.net/home/mdip/SpatialPy/examples/~/SpatialPy/env/lib/python3.11/site-packages/plotly/offline/offline.py:392), in iplot(figure_or_data, show_link, link_text, validate, image, filename, image_width, image_height, config, auto_play, animation_opts)
    387 post_script = build_save_image_post_script(
    388     image, filename, image_height, image_width, "iplot"
    389 )
    391 # Show figure
--> 392 pio.show(
    393     figure,
    394     validate=validate,
    395     config=config,
    396     auto_play=auto_play,
    397     post_script=post_script,
    398     animation_opts=animation_opts,
    399 )

File [~/SpatialPy/env/lib/python3.11/site-packages/plotly/io/_renderers.py:396](https://file+.vscode-resource.vscode-cdn.net/home/mdip/SpatialPy/examples/~/SpatialPy/env/lib/python3.11/site-packages/plotly/io/_renderers.py:396), in show(fig, renderer, validate, **kwargs)
    391         raise ValueError(
    392             "Mime type rendering requires ipython but it is not installed"
    393         )
    395     if not nbformat or Version(nbformat.__version__) < Version("4.2.0"):
--> 396         raise ValueError(
    397             "Mime type rendering requires nbformat>=4.2.0 but it is not installed"
    398         )
    400     ipython_display.display(bundle, raw=True)
    402 # external renderers```
@mdip226
Copy link
Author

mdip226 commented Jul 25, 2023

This was trying to do the animated plot.

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

1 participant