Skip to content

Possible import issue #358

@mdip226

Description

@mdip226

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```

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions