In my Sphinx project (Python 3.12.1, Sphinx 7.2.6 under Windows 10), when trying to generate the output HTML code using the "sphinx-build -E" command, I get the following persistent error:
"Extension error (sphinxprettysearchresults):Handler <function build_search_snippets at 0x0000022451ACBF60> for event 'build-finished' threw an exception (exception: name 'unicode' is not defined)".Earlier in 2023-2024, I resolved a bunch of similar errors.One of them:
"Extension error (sphinxprettysearchresults):Handler <function add_custom_source_link at 0x000001B2A7D96CA0> for event 'builder-inited' threw an exception (exception: name 'os' is not defined)"I resolved the issue by adding the following three lines of code at the beginning of the file Python\Lib\site-packages\sphinxprettysearchresults_init_.py:
import osimport syssys.path.insert(0, os.path.abspath('.'))I ENTERED THE FOLLOWING:
...\root\myrepo>sphinx-build -E d:\Luxoft\root\myrepo\en ...\root\myrepo-build\output\enI GOT THE FOLLLOWING:
Running Sphinx v7.2.6...\Python\Lib\site-packages\sphinxcontrib\images.py:32: RemovedInSphinx80Warning: The alias 'sphinx.util.status_iterator' is deprecated, use 'sphinx.util.display.status_iterator' instead. Check CHANGES for Sphinx API modifications. from sphinx.util import status_iteratorInitiated sphinxcontrib-images backend: `sphinxcontrib_images_lightbox2.lightbox2:LightBox2`building [mo]: targets for 0 po files that are out of datewriting output...building [html]: targets for 925 source files that are out of dateupdating environment: [new config] 925 added, 0 changed, 0 removedreading sources... [100%] usd_hydra/hydraDownloading remote images...Copying static files for sphinxcontrib-images...[100%] lightbox2-customize/jquery-noconflict.jslooking for now-outdated files... none foundpickling environment... donechecking consistency... donepreparing documents... donecopying assets... copying static files... donecopying extra files... donedonewriting output... [ 0%] amd_renderstudio/aboutExtension error (sphinxprettysearchresults):Handler <function build_search_snippets at 0x000001C9701CBF60> for event 'build-finished' threw an exception (exception: name 'unicode' is not defined)