-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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 extension error (sphinxprettysearchresults): for event 'build-finished', error "exception: name 'unicode' is not defined" #11921
Comments
I'm not sure you needed to create a duplicate issue, the |
@jdillard I also noticed that but the last update in the |
@Alex-TheWriter could you share what version of Sphinx you're using? The reason I ask: if you have upgraded (or can do) to Sphinx v2.0.0 or later, then you should be able to remove ( |
Ah: sometimes I get carried away doing the research, instead of reading the details... I see that you're on version 7.2.6 - so I think it should indeed be safe to remove |
@jdillard @electric-coder if my above explanation seems correct to you too: perhaps we could add a note to the (or, if we wanted to do something more awareness-raising, then perhaps a new release that adds an upper-bound Sphinx version dependency. doing that kind of thing apparently makes some Bazel builds unhappy, but on balance I think getting the message out that the extension is no longer required is probably a greater benefit) |
@jayaddison the last paragraph sums things up "in a nutshell"...
|
Thank you, @jayaddison, @electric-coder, and @jdillard, for your comments and suggestions on how to correct this and other errors of Sphinx.
QUESTIONS: Was sphinxprettysearchresults properly removed (if the next command tries to set it up again)? |
@Alex-TheWriter I think it means that in your extensions = [
"sphinx.ext.autodoc",
"sphinx.ext.napoleon",
# "sphinxprettysearchresults" # Remove this line!
"sphinx.ext.extlinks",
"sphinx.ext.intersphinx",
} |
Thank you, @electric-coder, the warning about the extension is no longer seen when running |
I'm pretty sure you need to open an issue on karma_sphinx_theme for that one, as this line looks to be the issue. They will need to support Sphinx 7. You can see some explanation here of people having that issue with a different theme: readthedocs/sphinx_rtd_theme#1465 edit: Someone already opened a PR to fix that: AccentDesign/karma_sphinx_theme#6 |
@Alex-TheWriter the excellent research from @jdillard shows the problem now is an incompatibility between the current Sphinx version and the theme you are using, notice the karma_sphinx_theme was last updated 4 years ago... I would recommend looking through the Sphinx themes gallery and choosing an up-to-date theme that's being actively maintained. Currently three themes are often recommend: furo theme, the PyData theme or the Sphinx book theme because they're well supported and have a large user base. Depending on what you want there are some more minimal themes that likely also work well. Check the theme's GitHub repositories for recent activity. |
I recently made the following changes:
|
Describe the bug
In my Sphinx project (details are given below), 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)".
How to Reproduce
I enter the following:
...\root\myrepo>sphinx-build -E ...\root\myrepo\en ...\root\myrepo-build\output\en
I get the following:
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_iterator
Initiated sphinxcontrib-images backend:
sphinxcontrib_images_lightbox2.lightbox2:LightBox2
building [mo]: targets for 0 po files that are out of date
writing output...
building [html]: targets for 925 source files that are out of date
updating environment: [new config] 925 added, 0 changed, 0 removed
reading sources... [100%] usd_hydra/hydra
Downloading remote images...
Copying static files for sphinxcontrib-images...[100%] lightbox2-customize/jquery-noconflict.js
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
copying assets... copying static files... done
copying extra files... done
done
writing output... [ 0%] amd_renderstudio/about
Extension error (sphinxprettysearchresults):
Handler <function build_search_snippets at 0x0000010F10D4FF60> for event 'build-finished' threw an exception (exception: name 'unicode' is not defined)
Environment Information
Sphinx extensions
The most recent versions of:
karma_sphinx_theme
sphinxprettysearchresults
sphinxcontrib-images
sphinx_sitemap
sphinxcontrib-contentui
Additional context
My PC is under Windows 10.
The text was updated successfully, but these errors were encountered: