Skip to content

Sphinx extension error (sphinxprettysearchresults): for event 'build-finished', error "exception: name 'unicode' is not defined" #11921

@Alex-TheWriter

Description

@Alex-TheWriter

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

Platform:              win32; (Windows-10-10.0.19045-SP0)
Python version:        3.12.1 (tags/v3.12.1:2305ca5, Dec  7 2023, 22:03:25) [MSC v.1937 64 bit (AMD64)])
Python implementation: CPython
Sphinx version:        7.2.6
Docutils version:      0.20.1
Jinja2 version:        3.1.3
Pygments version:      2.17.2

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions