- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
SystemError when trying to build a doc with Pyside6 resources #10009
Comments
Thank you for reporting. Could you try #10011 ? It will emit a warning instead of crash. |
Thanks for the quick reply ! I tried it and I get 203 warnings, all of the same structure:
The rough translation being "impossible to determine if <class ...> is documented, the following error was raised: null argument to internal routine. All the warnings are for classes, there are all the same warning, all with the "null argument to internal routine" Among those 203 warnings, some are repeated, the number of warnings per class being correleted with the number of methods of each class. I also checked, (for the first 5 warnings, 2 random ones in the middle and the 2 last ones), and all those classes do not have a docstring The doc builds fine, the elements raising a warning just don't show up. If I delete the resources folder like before, I get the exact same warnings |
Is it helpful if we show the name of attribute on the error? If so, I'll change the message with pleasure. |
I actually managed to reproduce the bug : https://github.com/Nateckert/sphinx_bug_highlight It seems to be linked with the inheritance to PySide6 elements. With regards to the name of the attribute, having the warnings helped me to reproduce the bug but there is definitely a bug on the sphinx/PySide side and I don't think there is a point to improve the message as (hopefully) it will not be raised once it's fixed Regards |
Thank you for your comment. I just updated #10011 to show the attribute name. I hope it will help your work. |
Fix #10009: autodoc: Crashes if subject raises an error on getdoc()
Describe the bug
Hi,
We have a fairly large project with the following folder structure:
ui/resources
is actually not a valid Python package, but before running the GUI, we use the commandpyside6-rcc ui/resources/gui.qrc -o ui/resources.py
The file
ui\__init__.py
contains the linefrom . import resources
When we build the doc with sphinx , we get the exception:
The log itself is not more useful either :
When we build the doc from the sources, we get this error.
When we build it after generating
ui\resources.py
, we get this errorWhen we build it after generating
ui\resources.py
and deleting the folderui\resources
, we get this errorWhen we build it after deleting the
ui\resources
and the fileui\resources.py
, it worksHow to Reproduce
I am trying to create a minimal reproducable example but my attempts failed so far
The doc itself was built running the following powershell script
Expected behavior
The main issue I had is not the error itself, as we are going to change how we package the pyside6 resources to the gui to fix it, but the fact that neither the error message nor the log pointed towards the issue
To find the culprit, I started to delete folders of my projet until I managed to build the doc and finally find the culprit.
Your project
Still working on a minimal reproducible example
Screenshots
No response
OS
Windows 10
Python version
3.9.9
Sphinx version
4.3.2
Sphinx extensions
sphinx_rtd_theme, sphinx.ext.autodoc, matplotlib.sphinxext.plot_directive'
Extra tools
Pyside6==6.2.2.1
Additional context
Thanks a lot for providing a great documentation tool !
The text was updated successfully, but these errors were encountered: