Skip to content
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

Sphinx 3.5 says "copying static files... failed" and "WARNING: cannot copy static file FileNotFoundError(2, 'No such file or directory')" #8882

Closed
lsaffre opened this issue Feb 14, 2021 · 6 comments

Comments

@lsaffre
Copy link
Contributor

lsaffre commented Feb 14, 2021

Describe the bug
After upgrading to Sphinx 3.5, sphinx-build says "copying static files... failed" and "WARNING: cannot copy static file FileNotFoundError(2, 'No such file or directory')" in some of my repositories. I guess that something has changed or become more severe and that my configs need some change... but what change? The warning is not helpful.

To Reproduce
Steps to reproduce the behavior:

$ git clone https://github.com/lino-framework/cg.git
$ cd cg
$ pip install sphinx atelier lino
$ inv bd

Output:

Invoke sphinx-build -b html -T -d /home/luc/tmp/a/cg/docs/.build/.doctrees -W --keep-going . /home/luc/tmp/a/cg/docs/.build
Running Sphinx v3.5.0
...
build succeeded.
The HTML pages are in .build.

Invoke sphinx-build -b html -T -D language=de -A language=de -d /home/luc/tmp/a/cg/docs/.build/de/.doctrees -W --keep-going . /home/luc/tmp/a/cg/docs/.build/de
Running Sphinx v3.5.0
loading translations [de]... done
making output directory... done
...
copying images... [100%] lino/14.png                                                                                                                                          
copying static files... failed
WARNING: cannot copy static file FileNotFoundError(2, 'No such file or directory')
copying extra files... done
dumping search index in German (code: de)... done
dumping object inventory... done
build finished with problems, 1 warning.

Environment info

  • OS: Ubuntu Bionic
  • Python version: 3.6.8
  • Sphinx version: 3.5.0

About this project
I maintain a few dozen of Sphinx doctrees in different repositories. I have similar errors in several (but not all) of my repositories. This particular project is the source code of https://community.lino-framework.org

@jfbu
Copy link
Contributor

jfbu commented Feb 14, 2021

I reproduce the issue with Python 3.6.8, but not with 3.7.5 nor with 3.8.7. Also, the issue arises when building for either French or German versions, not English, as I determined by issueing separated build commands directly (rather than via inv bd)

side note: at my old mac os, the build of Pillow fails with missing library error during gcc execution. So I commented out two lines from docs/conf.py.

-extensions += ['lino.sphinxcontrib.logo']
-extensions += ['lino.sphinxcontrib.base']  # for tcname
+# extensions += ['lino.sphinxcontrib.logo']
+# extensions += ['lino.sphinxcontrib.base']  # for tcname

only to be able to test and as this reproduced the same error message you reported I decided to include this information.

@jfbu
Copy link
Contributor

jfbu commented Feb 14, 2021

I reproduce the issue with Python 3.6.8, but not with 3.7.5 nor with 3.8.7. Also, the issue arises when building for either French or German versions, not English, as I determined by issueing separated build commands directly (rather than via inv bd)

arrrgggh sorry. In fact my virtual environments for Python 3.7 and 3.8 had an editable install of Sphinx from a clone of the repo. Whereas the Python 3.6 environment has a "pip install sphinx". So maybe there is packaging problem.

Sorry again for misleading information.

@jfbu
Copy link
Contributor

jfbu commented Feb 14, 2021

The pip packaged Sphinx is lacking sphinx/search/minified-js directory, it only has sphinx/search/non-minified-js. I see now some other issues have been raised to this effect...

cf #8886

@jfbu jfbu added this to the 3.5.1 milestone Feb 14, 2021
@lsaffre
Copy link
Contributor Author

lsaffre commented Feb 14, 2021

Indeed now that you mentioned it: the error happens in all my non-english doctrees!
I didn't yet investigate further into this, I just switched back to Sphinx<3.5 because I am a bit in a hurry with other projects. If it helps you, I can install a clone of Sphinx and test with unreleased Sphinx versions. But otherwise I am okay to wait for the next PyPI release.

@jfbu
Copy link
Contributor

jfbu commented Feb 14, 2021

marking this as duplicate of #8884 even though you reported first :-) over there the discussion does not have my misleading comments due to me testing not with the PyPI packaging except with Python 3.6 so I am adding the #8884 link here to re-direct people. Thanks and sorry...

@tk0miya
Copy link
Member

tk0miya commented Feb 15, 2021

I believe this is fixed now by #8886. Thank you for reporting as always!

@tk0miya tk0miya closed this as completed Feb 15, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants