Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Description
Bug summary
The function_copy_css_file
insphinxext/plot_directive.py
assumes that the_static
directory already exists. If it doesn't, then rather than creating_static/plot_directive.css
with the appropriate content, it instead writes that content to a file_static
. If another part of Sphinx then tries to create a directory_static
, it results in an error.
We run into this problem in Sagemath (seehttps://trac.sagemath.org/ticket/32262) because we have a complicated directory layout for Sphinx output, and the_static
directory may not be created right away.
Code for reproduction
BuildSagemath+thelatestmatplotlib (https://trac.sagemath.org/ticket/31580).
Actual outcome
Sphinx raises an error:OSError: WARNING: cannot copy static file FileExistsError(17, 'File exists')
. A more complete traceback is athttps://trac.sagemath.org/ticket/31580.
Expected outcome
Used to work with version 3.3.4 ofmatplotlib
, which I believe is before the function_copy_css_file
was introduced.
Operating system
Observed on OS X and linux
Matplotlib Version
3.4.2
Matplotlib Backend
No response
Python version
3.9
Jupyter version
No response
Other libraries
No response
Installation
No response
Conda channel
No response