Skip to content

Error when using two image scrappers together #2014

Closed
@jorgepiloto

Description

@jorgepiloto

Introduction to the problem

I am trying to move the current Jupyter Notebook examples of the poliastro project to an Sphinx-Gallery set. Since we are making use of plotly figures we need to capture them as output figures and therefore, make use of the plotly image scrapper. We also need to capture matplotlib figures, so this image scrapper must be also added to the conf.py file.

How to reproduce this issue 🪲

If you download the official example repository from @emmanuelle for achieving this task and you add the following simple Python file in the examples/ directory for plotting a sinusoidal wave with matplotlib and error is raised:

generating gallery...
generating gallery for auto_examples... [ 25%] plot_sin.py                                                                                                                                       
Exception occurred:
  File "/home/lobo/anaconda3/envs/poliastro/lib/python3.7/site-packages/plotly/io/_sg_scraper.py", line 91, in figure_rst
    figure_name = figure_paths[0]
IndexError: list index out of range

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions