diff --git a/packages/python/plotly/plotly/io/_sg_scraper.py b/packages/python/plotly/plotly/io/_sg_scraper.py index 1d9c649b30b..3f514a57ca8 100644 --- a/packages/python/plotly/plotly/io/_sg_scraper.py +++ b/packages/python/plotly/plotly/io/_sg_scraper.py @@ -88,6 +88,8 @@ def figure_rst(figure_list, sources_dir): for figure_path in figure_list ] images_rst = "" + if not figure_paths: + return images_rst figure_name = figure_paths[0] ext = os.path.splitext(figure_name)[1] figure_path = os.path.join("images", os.path.basename(figure_name))