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

Broken extension with sphinx 7.2.2 #15

Closed
ikerexxe opened this issue Aug 23, 2023 · 3 comments · Fixed by #16
Closed

Broken extension with sphinx 7.2.2 #15

ikerexxe opened this issue Aug 23, 2023 · 3 comments · Fixed by #16

Comments

@ikerexxe
Copy link

This extension is broken with sphinx 7.2.2. When I try to build sssd.io it fails with TypeError: unsupported operand type(s) for +: 'PosixPath' and 'str'. It fails in both our CI and a local container environment. It was building correctly three weeks ago with sphinx 7.1.1.

Similar to sphinx-doc/sphinx#11629, but I'm not completely sure which of the two projects is at fault, so I prefer to open this ticket so that this extension's community is aware of the problem.

Full log:

Traceback (most recent call last):
  File "/sssd.io/.venv/lib/python3.10/site-packages/sphinx/events.py", line 96, in emit
    results.append(listener.handler(self.app, *args))
  File "/sssd.io/.venv/lib/python3.10/site-packages/sphinx_gitstamp/__init__.py", line 32, in page_context_handler
    docsrc = app.confdir + "/"
TypeError: unsupported operand type(s) for +: 'PosixPath' and 'str'

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

Traceback (most recent call last):
  File "/sssd.io/.venv/lib/python3.10/site-packages/sphinx/cmd/build.py", line 298, in build_main
    app.build(args.force_all, args.filenames)
  File "/sssd.io/.venv/lib/python3.10/site-packages/sphinx/application.py", line 355, in build
    self.builder.build_update()
  File "/sssd.io/.venv/lib/python3.10/site-packages/sphinx/builders/__init__.py", line 293, in build_update
    self.build(to_build,
  File "/sssd.io/.venv/lib/python3.10/site-packages/sphinx/builders/__init__.py", line 363, in build
    self.write(docnames, list(updated_docnames), method)
  File "/sssd.io/.venv/lib/python3.10/site-packages/sphinx/builders/__init__.py", line 571, in write
    self._write_serial(sorted(docnames))
  File "/sssd.io/.venv/lib/python3.10/site-packages/sphinx/builders/__init__.py", line 581, in _write_serial
    self.write_doc(docname, doctree)
  File "/sssd.io/.venv/lib/python3.10/site-packages/sphinx/builders/html/__init__.py", line 655, in write_doc
    self.handle_page(docname, ctx, event_arg=doctree)
  File "/sssd.io/.venv/lib/python3.10/site-packages/sphinx/builders/html/__init__.py", line 1101, in handle_page
    newtmpl = self.app.emit_firstresult('html-page-context', pagename,
  File "/sssd.io/.venv/lib/python3.10/site-packages/sphinx/application.py", line 492, in emit_firstresult
    return self.events.emit_firstresult(event, *args,
  File "/sssd.io/.venv/lib/python3.10/site-packages/sphinx/events.py", line 117, in emit_firstresult
    for result in self.emit(name, *args, allowed_exceptions=allowed_exceptions):
  File "/sssd.io/.venv/lib/python3.10/site-packages/sphinx/events.py", line 107, in emit
    raise ExtensionError(__("Handler %r for event %r threw an exception") %
sphinx.errors.ExtensionError: Handler <function page_context_handler at 0x7efc876f3400> for event 'html-page-context' threw an exception (exception: unsupported operand type(s) for +: 'PosixPath' and 'str')

Extension error (sphinx_gitstamp):
Handler <function page_context_handler at 0x7efc876f3400> for event 'html-page-context' threw an exception (exception: unsupported operand type(s) for +: 'PosixPath' and 'str')
make: *** [Makefile:12: html] Error 2
@AA-Turner
Copy link
Contributor

Please test with Sphinx 7.2.3, which should fix this issue.

A

@jdillard
Copy link
Owner

Thanks for flagging! Looks like I'll need to fix before Sphinx 8, but should be a pretty easy fix. I'll try and get a new version out soon before I forget.

@ikerexxe
Copy link
Author

Ok, this is fixed now. Thank you!

I think we can close this issue, but Jared's words indicate that there's still something to be done, so I'm keeping it open. Please feel free to close it if you think there's nothing to do on this project.

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

Successfully merging a pull request may close this issue.

3 participants