Skip to content

Error when using two image scrappers together #2014

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

Closed
jorgepiloto opened this issue Dec 22, 2019 · 1 comment · Fixed by #2015
Closed

Error when using two image scrappers together #2014

jorgepiloto opened this issue Dec 22, 2019 · 1 comment · Fixed by #2015
Assignees

Comments

@jorgepiloto
Copy link

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
@emmanuelle
Copy link
Contributor

Thank you for the bug report @jorgepiloto. I've opened #2015 to correct this. Could you please try it with the scraper branch of the PR to check that it's working well for you (also maybe with more examples)? They should be a release of plotly.py in the first half of January so we should be able to include a fix.

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

Successfully merging a pull request may close this issue.

2 participants