Open informatimago opened 2 years ago
I also experienced this bug. The workaround solution seems to be to copy the missing file to the tmp directory. Here's the Linux command:
cp docs/_build/html/searchindex.js docs/_build/html/searchindex.js.tmp
Hmm... it's strange. Python interpreter surely closes the .tmp file after the with
block. So I'm not sure why the file was vanished...
I'm experiencing this bug too but only when the docs are being built in a pre-commit
hook.
I can confirm that @barbaricyawps's workaround works for my case too, but it is not a long-term solution.
I think this may be an issue when multiple sphinx commands are running at the same time-- specifically, I observe this when running sphinx-build doctest
and make html
, even though they are pointed at different directories. Error goes away if I make html
first once (or even sleep for 1 second).
Describe the bug
When generating our doc, with
make html
, I get this error:Note: I added a print in the if to know whether it was unicode or non-unicode that failed:
But I don't know how to catch an error from self.indexer.dump or if it's silent.
cf. logs:
sphinx-err-62za4hmz.log sphinx.log
How to Reproduce
I prepare the environment with:
requirements.txt
In addition, the following sphinx debian packages are installed:
Expected behavior
I'd expect the searchindex.js.tmp file to be generated, or its absence to be ignored.
Your project
Proprietary.
Screenshots
No response
OS
linux
Python version
3.9.2
Sphinx version
2.4.4
Sphinx extensions
Extra tools
No response
Additional context
NA