sphinx-contrib / sphinx-pretty-searchresults

Sphinx: pretty search results is an extension for the Sphinx documentation tool. To display search results, Sphinx is fetching the source files of search hits and rendering excerpts in raw markup. This extension removes the markup from these source files (during build time), so the search results look decent.
https://pypi.python.org/pypi/sphinxprettysearchresults
MIT License
22 stars 5 forks source link

When adding this extension, "make html" fails with the error "name 'unicode' is not defined": sphinxprettysearchresults\__init__.py", line 11 #8

Closed carlossc closed 8 years ago

carlossc commented 8 years ago

When adding this extension, the "make html" of my Sphinx project fails with the error

File "c:\python35-32\lib\site-packages\sphinxprettysearchresultsinit.py", line 11, in clean_txts if isinstance(outdir, unicode): NameError: name 'unicode' is not defined

If I edit __init__.py to comment from the line 11 to 14, the error no longer occurs.

If I remove the extension sphinxprettysearchresults the error no longer occurs.

How to reproduce the issue

. Add 'sphinxprettysearchresults' to the element extensions.

. From the command line, make html

The process fail with an error like the following:

Exception occurred: File "c:\python35-32\lib\site-packages\sphinxprettysearchresultsinit.py", line 11, in clean_txts if isinstance(outdir, unicode): NameError: name 'unicode' is not defined The full traceback has been saved in C:\Users\csantos\AppData\Local\Temp\sphinx-err-cva6363u.log, if you want to report the issue to the developers. Please also report this if it was a user error, so that a better error message can be provided next time. A bug report can be filed in the tracker at https://github.com/sphinx-doc/sphinx/issues. Thanks!

Versions involved

  • sphinxprettysearchresults (0.1.6)
  • Python 3.5.1
  • Sphinx (1.4.3)
  • sphinx-javalink (0.11.1)
  • sphinx-rtd-theme (0.1.9)
carlossc commented 8 years ago

Attaching the output of the file mentioned in the description of the issue: sphinx-err-cva6363u.txt

TimKam commented 8 years ago

Thanks for the report, @carlossc . Some lines weren't compatible with python3. I fixed this and released a new version (0.1.7).