useblocks / sphinx-needs

Adds needs/requirements to sphinx
https://sphinx-needs.readthedocs.io/en/latest/index.html
MIT License
213 stars 66 forks source link

module 'gi' has no attribute 'require_version' #923

Open Torxed opened 1 year ago

Torxed commented 1 year ago

Following the Installation guide on a fresh install of Python, I get:

Extension error (sphinx_needs.needs):
Handler <function process_creator.<locals>.process_caller at 0x7f28b3e86e60> for event 'doctree-resolved' threw an exception (exception: module 'gi' has no attribute 'require_version')

Thanks to Ghost in https://github.com/enkore/i3pystatus/issues/314#issuecomment-180874574 for pointing out that python-gobject is needed when this issue pops up.

Perhaps gobject could be a dependency of sphinx-needs?

danwos commented 1 year ago

Thanks for the bug report. Unfortunately, I'm unsure if this error is Sphinx-Needs related, as it is not directly using anything called gi or require_version. But maybe a used dependency is doing this and is based on a lib, which changed its API.

However, can you call sphinx-build with the verbose flag -v? Then you will also get the traceback for the error, which was triggering your documented error. So sphinx-build -b html -v . _build/html normally does the trick.

Thanks for your help :+1: