Skip to content
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

Extension error #1018

Open
liamh opened this issue Jan 22, 2025 · 4 comments
Open

Extension error #1018

liamh opened this issue Jan 22, 2025 · 4 comments

Comments

@liamh
Copy link

liamh commented Jan 22, 2025

I get a warning and an "Extension error", the latter causes my build to fail

Running Sphinx v7.2.6
/usr/lib/python3/dist-packages/breathe/project.py:116: RemovedInSphinx80Warning: Sphinx 8 will drop support for representing paths as strings. Use "pathlib.Path" or "os.fspath" instead.
  self._default_build_dir = os.path.dirname(app.doctreedir.rstrip(os.sep))

Extension error (breathe.directives.setup):
Handler <function setup.<locals>.doxygen_hook at 0x7202ea300d60> for event 'builder-inited' threw an exception (exception: too many values to unpack (expected 2))
make[2]: *** [sphinx/CMakeFiles/Sphinx.dir/build.make:71: sphinx/CMakeFiles/Sphinx] Error 2
make[1]: *** [CMakeFiles/Makefile2:170: sphinx/CMakeFiles/Sphinx.dir/all] Error 2
make: *** [Makefile:136: all] Error 2

I think this issue covers the warning.

At one time, the project would build completely, then it would build without documentation, now it won't build anything.
The project is public.

@AA-Turner
Copy link
Collaborator

AA-Turner commented Jan 22, 2025

The actual error is too many values to unpack (expected 2). Please run with --show-traceback and paste the contents of the generated log file.

A

@liamh
Copy link
Author

liamh commented Jan 23, 2025

I don't know where to put this. The error seems to be happening in the call to sphinx-build which doesn't have that option.

@AA-Turner
Copy link
Collaborator

@liamh
Copy link
Author

liamh commented Jan 23, 2025

Ah, thanks. When I did man sphinx-build it only showed the -T form

usr/bin/sphinx-build -T -b html /home/healy/Desktop/utility/readpar/sphinx/source /home/healy/Desktop/utility/readpar/sphinx/build
Running Sphinx v7.2.6
/usr/lib/python3/dist-packages/breathe/project.py:116: RemovedInSphinx80Warning: Sphinx 8 will drop support for representing paths as strings. Use "pathlib.Path" or "os.fspath" instead.
  self._default_build_dir = os.path.dirname(app.doctreedir.rstrip(os.sep))

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/sphinx/events.py", line 97, in emit
    results.append(listener.handler(self.app, *args))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/breathe/directives/setup.py", line 114, in doxygen_hook
    doxygen_handle.generate_xml(
  File "/usr/lib/python3/dist-packages/breathe/process.py", line 58, in generate_xml
    folder, contents = file_structure
    ^^^^^^^^^^^^^^^^
ValueError: too many values to unpack (expected 2)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/sphinx/cmd/build.py", line 293, in build_main
    app = Sphinx(args.sourcedir, args.confdir, args.outputdir,
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/sphinx/application.py", line 271, in __init__
    self._init_builder()
  File "/usr/lib/python3/dist-packages/sphinx/application.py", line 342, in _init_builder
    self.events.emit('builder-inited')
  File "/usr/lib/python3/dist-packages/sphinx/events.py", line 108, in emit
    raise ExtensionError(__("Handler %r for event %r threw an exception") %
sphinx.errors.ExtensionError: Handler <function setup.<locals>.doxygen_hook at 0x7007e7b08e00> for event 'builder-inited' threw an exception (exception: too many values to unpack (expected 2))

Extension error (breathe.directives.setup):
Handler <function setup.<locals>.doxygen_hook at 0x7007e7b08e00> for event 'builder-inited' threw an exception (exception: too many values to unpack (expected 2))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants