Open myselfhimself opened 4 years ago
Here is a readthedocs.io failing build:
Running Sphinx v1.8.5
loading translations [en]... done
Traceback (most recent call last):
File "/home/docs/checkouts/readthedocs.org/user_builds/gmic-py/envs/latest/lib/python3.7/site-packages/sphinx/registry.py", line 472, in load_extension
mod = __import__(extname, None, None, ['setup'])
File "/home/docs/checkouts/readthedocs.org/user_builds/gmic-py/envs/latest/lib/python3.7/site-packages/pyquickhelper/sphinxext/__init__.py", line 34, in <module>
from .sphinx_tocdelay_extension import TocDelayDirective, tocdelay_node
File "/home/docs/checkouts/readthedocs.org/user_builds/gmic-py/envs/latest/lib/python3.7/site-packages/pyquickhelper/sphinxext/sphinx_tocdelay_extension.py", line 12, in <module>
from sphinx.errors import NoUri
ImportError: cannot import name 'NoUri' from 'sphinx.errors' (/home/docs/checkouts/readthedocs.org/user_builds/gmic-py/envs/latest/lib/python3.7/site-packages/sphinx/errors.py)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/docs/checkouts/readthedocs.org/user_builds/gmic-py/envs/latest/lib/python3.7/site-packages/sphinx/cmd/build.py", line 303, in build_main
args.tags, args.verbosity, args.jobs, args.keep_going)
File "/home/docs/checkouts/readthedocs.org/user_builds/gmic-py/envs/latest/lib/python3.7/site-packages/sphinx/application.py", line 228, in __init__
self.setup_extension(extension)
File "/home/docs/checkouts/readthedocs.org/user_builds/gmic-py/envs/latest/lib/python3.7/site-packages/sphinx/application.py", line 449, in setup_extension
self.registry.load_extension(self, extname)
File "/home/docs/checkouts/readthedocs.org/user_builds/gmic-py/envs/latest/lib/python3.7/site-packages/sphinx/registry.py", line 475, in load_extension
raise ExtensionError(__('Could not import extension %s') % extname, err)
sphinx.errors.ExtensionError: Could not import extension pyquickhelper.sphinxext.sphinx_autosignature (exception: cannot import name 'NoUri' from 'sphinx.errors' (/home/docs/checkouts/readthedocs.org/user_builds/gmic-py/envs/latest/lib/python3.7/site-packages/sphinx/errors.py))
Extension error:
Could not import extension pyquickhelper.sphinxext.sphinx_autosignature (exception: cannot import name 'NoUri' from 'sphinx.errors' (/home/docs/checkouts/readthedocs.org/user_builds/gmic-py/envs/latest/lib/python3.7/site-packages/sphinx/errors.py))
OK sorry the above readthedocs.io error is due to an old sphinx version by default on this platform, I managed to overcome it..
OK autosignature
is now used at https://gmic-py.readthedocs.io/en/latest/PIL.html for the first two black links
I have decided to ignore the warnings for now..
To fix it, I would probably add a parameter in conf.py to disable warnings. Would that be ok for you?
yes
Thank you
I looked into the code and the logging [import_object] ...
should not appear unless :debug:
is added as on option to the directive. The warning WARNING: [autosignature]
should not appear unless the directive does not work. I looked at https://gmic-py.readthedocs.io/en/latest/PIL.html and it looks ok. I guess I'll have to build and run the documentation to fully understand what's happening.
ok thank you for kindness Xavier I have accepted to build with warnings
čt 12. 11. 2020 v 0:51 odesílatel xavier dupré notifications@github.com napsal:
I looked into the code and the logging [import_object] ... should not appear unless :debug: is added as on option to the directive. The warning WARNING: [autosignature] should not appear unless the directive does not work. I looked at https://gmic-py.readthedocs.io/en/latest/PIL.html and it looks ok. I guess I'll have to build and run the documentation to fully understand what's happening.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/sdpython/pyquickhelper/issues/319#issuecomment-725728330, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJU5QX4R3S74VLZVJGEZYLSPMPORANCNFSM4S3MQL4Q .
Hello,
I would like to remove warnings mostly. I describe my setup below:
I am trying this in a .rst file for the gmic-py purely compiled C/C++ Python binding which has C docstrings:
.. autosignature:: gmic.GmicImage.from_PIL :nosummary: :debug:
For it to work I had to do three things:
pyquickhelper
andsphinxcontrib.imagesvg
to my docs/'s requirements.txtimport gmic
and addpyquickhelper.sphinxext.sphinx_autosignature
to the extensions array variable, within mydocs/conf.py
after this, when building HTML with sphinx, I get the following log with warnings regarding a package import attempt:
the result is:
How do I:
Thanks for your help!