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

2.12.1: sphinx warnings reference target not found #259

Open
kloczek opened this issue Mar 13, 2024 · 0 comments
Open

2.12.1: sphinx warnings reference target not found #259

kloczek opened this issue Mar 13, 2024 · 0 comments

Comments

@kloczek
Copy link

kloczek commented Mar 13, 2024

First of all currently sphinx-build command shows some warnings because is missing path to anytree source tree

+ /usr/bin/sphinx-build -n -T -b man docs build/sphinx/man
Running Sphinx v7.2.6
making output directory... done
loading intersphinx inventory from http://docs.python.org/3/objects.inv...
intersphinx inventory has moved: http://docs.python.org/3/objects.inv -> https://docs.python.org/3/objects.inv
building [mo]: targets for 0 po files that are out of date
writing output...
building [man]: all manpages
updating environment: [new config] 27 added, 0 changed, 0 removed
reading sources... [100%] tricks/yaml
WARNING: autodoc: failed to import module 'cachedsearch' from module 'anytree'; the following exception was raised:
No module named 'anytree'
WARNING: autodoc: failed to import module 'iterators' from module 'anytree'; the following exception was raised:
No module named 'anytree'
WARNING: autodoc: failed to import module 'iterators.preorderiter' from module 'anytree'; the following exception was raised:
No module named 'anytree'
WARNING: autodoc: failed to import module 'iterators.postorderiter' from module 'anytree'; the following exception was raised:
No module named 'anytree'
WARNING: autodoc: failed to import module 'iterators.levelorderiter' from module 'anytree'; the following exception was raised:
No module named 'anytree'
WARNING: autodoc: failed to import module 'iterators.levelordergroupiter' from module 'anytree'; the following exception was raised:
No module named 'anytree'
WARNING: autodoc: failed to import module 'iterators.zigzaggroupiter' from module 'anytree'; the following exception was raised:
No module named 'anytree'
WARNING: autodoc: failed to import module 'node' from module 'anytree'; the following exception was raised:
No module named 'anytree'
WARNING: autodoc: failed to import module 'node.anynode' from module 'anytree'; the following exception was raised:
No module named 'anytree'
WARNING: autodoc: failed to import module 'node.node' from module 'anytree'; the following exception was raised:
No module named 'anytree'
WARNING: autodoc: failed to import module 'node.nodemixin' from module 'anytree'; the following exception was raised:
No module named 'anytree'
WARNING: autodoc: failed to import module 'node.lightnodemixin' from module 'anytree'; the following exception was raised:
No module named 'anytree'
WARNING: autodoc: failed to import module 'node.symlinknode' from module 'anytree'; the following exception was raised:
No module named 'anytree'
WARNING: autodoc: failed to import module 'node.symlinknodemixin' from module 'anytree'; the following exception was raised:
No module named 'anytree'
WARNING: autodoc: failed to import module 'node.exceptions' from module 'anytree'; the following exception was raised:
No module named 'anytree'
WARNING: autodoc: failed to import module 'render' from module 'anytree'; the following exception was raised:
No module named 'anytree'
WARNING: autodoc: failed to import module 'resolver' from module 'anytree'; the following exception was raised:
No module named 'anytree'
WARNING: autodoc: failed to import module 'search' from module 'anytree'; the following exception was raised:
No module named 'anytree'
WARNING: autodoc: failed to import module 'util' from module 'anytree'; the following exception was raised:
No module named 'anytree'
WARNING: autodoc: failed to import module 'walker' from module 'anytree'; the following exception was raised:
No module named 'anytree'
WARNING: autodoc: failed to import module 'dotexport' from module 'anytree'; the following exception was raised:
No module named 'anytree'
WARNING: autodoc: failed to import module 'exporter.dictexporter' from module 'anytree'; the following exception was raised:
No module named 'anytree'
WARNING: autodoc: failed to import module 'exporter.dotexporter' from module 'anytree'; the following exception was raised:
No module named 'anytree'
WARNING: autodoc: failed to import module 'exporter.jsonexporter' from module 'anytree'; the following exception was raised:
No module named 'anytree'
WARNING: autodoc: failed to import module 'exporter.mermaidexporter' from module 'anytree'; the following exception was raised:
No module named 'anytree'
WARNING: autodoc: failed to import module 'importer.dictimporter' from module 'anytree'; the following exception was raised:
No module named 'anytree'
WARNING: autodoc: failed to import module 'importer.jsonimporter' from module 'anytree'; the following exception was raised:
No module named 'anytree'
looking for now-outdated files... none found
pickling environment... done
checking consistency... /home/tkloczko/rpmbuild/BUILD/anytree-2.12.1/docs/dotexport.rst: WARNING: document isn't included in any toctree
done
writing... python-anytree.3 { installation intro api api/anytree.node api/anytree.iterators api/anytree.render api/anytree.search api/anytree.cachedsearch api/anytree.resolver api/anytree.walker api/anytree.util importer importer/dictimporter importer/jsonimporter exporter exporter/dictexporter exporter/jsonexporter exporter/dotexporter exporter/mermaidexporter tricks tricks/readonly tricks/yaml tricks/multidim tricks/weightededges tricks/consistencychecks } /home/tkloczko/rpmbuild/BUILD/anytree-2.12.1/docs/intro.rst:11: WARNING: 'any' reference target not found: Node
/home/tkloczko/rpmbuild/BUILD/anytree-2.12.1/docs/intro.rst:12: WARNING: 'any' reference target not found: AnyNode
/home/tkloczko/rpmbuild/BUILD/anytree-2.12.1/docs/intro.rst:13: WARNING: 'any' reference target not found: NodeMixin
/home/tkloczko/rpmbuild/BUILD/anytree-2.12.1/docs/intro.rst:17: WARNING: 'any' reference target not found: Resolver
/home/tkloczko/rpmbuild/BUILD/anytree-2.12.1/docs/intro.rst:18: WARNING: 'any' reference target not found: Walker
/home/tkloczko/rpmbuild/BUILD/anytree-2.12.1/docs/intro.rst:22: WARNING: 'any' reference target not found: PreOrderIter
/home/tkloczko/rpmbuild/BUILD/anytree-2.12.1/docs/intro.rst:23: WARNING: 'any' reference target not found: PostOrderIter
/home/tkloczko/rpmbuild/BUILD/anytree-2.12.1/docs/intro.rst:24: WARNING: 'any' reference target not found: LevelOrderIter
/home/tkloczko/rpmbuild/BUILD/anytree-2.12.1/docs/intro.rst:25: WARNING: 'any' reference target not found: LevelOrderGroupIter
/home/tkloczko/rpmbuild/BUILD/anytree-2.12.1/docs/intro.rst:26: WARNING: 'any' reference target not found: ZigZagGroupIter
/home/tkloczko/rpmbuild/BUILD/anytree-2.12.1/docs/intro.rst:34: WARNING: 'any' reference target not found: RenderTree
/home/tkloczko/rpmbuild/BUILD/anytree-2.12.1/docs/intro.rst:31: WARNING: 'any' reference target not found: AsciiStyle
/home/tkloczko/rpmbuild/BUILD/anytree-2.12.1/docs/intro.rst:32: WARNING: 'any' reference target not found: ContStyle
/home/tkloczko/rpmbuild/BUILD/anytree-2.12.1/docs/intro.rst:33: WARNING: 'any' reference target not found: ContRoundStyle
/home/tkloczko/rpmbuild/BUILD/anytree-2.12.1/docs/intro.rst:34: WARNING: 'any' reference target not found: DoubleStyle
/home/tkloczko/rpmbuild/BUILD/anytree-2.12.1/docs/intro.rst:53: WARNING: 'any' reference target not found: children
/home/tkloczko/rpmbuild/BUILD/anytree-2.12.1/docs/intro.rst:131: WARNING: 'any' reference target not found: NodeMixin
/home/tkloczko/rpmbuild/BUILD/anytree-2.12.1/docs/intro.rst:131: WARNING: 'any' reference target not found: Node
/home/tkloczko/rpmbuild/BUILD/anytree-2.12.1/docs/tricks/yaml.rst:21: WARNING: 'any' reference target not found: DictExporter
/home/tkloczko/rpmbuild/BUILD/anytree-2.12.1/docs/tricks/yaml.rst:50: WARNING: 'any' reference target not found: DictExporter
/home/tkloczko/rpmbuild/BUILD/anytree-2.12.1/docs/tricks/yaml.rst:61: WARNING: 'any' reference target not found: DictImporter
/home/tkloczko/rpmbuild/BUILD/anytree-2.12.1/docs/index.rst:132: WARNING: 'any' reference target not found: Node
/home/tkloczko/rpmbuild/BUILD/anytree-2.12.1/docs/index.rst:132: WARNING: 'any' reference target not found: RenderTree
/home/tkloczko/rpmbuild/BUILD/anytree-2.12.1/docs/index.rst:142: WARNING: 'any' reference target not found: UniqueDotExporter
/home/tkloczko/rpmbuild/BUILD/anytree-2.12.1/docs/index.rst:207: WARNING: 'any' reference target not found: NodeMixin
done
build succeeded, 53 warnings.
This can be fixed by patch like below: ```patch --- a/docs/conf.py +++ b/docs/conf.py @@ -3,6 +3,9 @@ # For the full list of built-in configuration values, see the documentation: # https://www.sphinx-doc.org/en/master/usage/configuration.html

+import sys
+import os
+sys.path.insert(0, os.path.abspath(".."))

-- Project information -----------------------------------------------------

https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information


This patch fixes what is in the comment and that can of fix is suggested in sphinx example copy.py https://www.sphinx-doc.org/en/master/usage/configuration.html#example-of-configuration-file

Than .. on building my packages I'm using `sphinx-build` command with `-n` switch which shows warmings about missing references. These are not critical issues.
<details>
<summary>Here is the output with warnings:</summary>

```console
+ /usr/bin/sphinx-build -n -T -b man docs build/sphinx/man
Running Sphinx v7.2.6
making output directory... done
loading intersphinx inventory from http://docs.python.org/3/objects.inv...
intersphinx inventory has moved: http://docs.python.org/3/objects.inv -> https://docs.python.org/3/objects.inv
building [mo]: targets for 0 po files that are out of date
writing output...
building [man]: all manpages
updating environment: [new config] 27 added, 0 changed, 0 removed
reading sources... [100%] tricks/yaml
looking for now-outdated files... none found
pickling environment... done
checking consistency... /home/tkloczko/rpmbuild/BUILD/anytree-2.12.1/docs/dotexport.rst: WARNING: document isn't included in any toctree
done
writing... python-anytree.3 { installation intro api api/anytree.node api/anytree.iterators api/anytree.render api/anytree.search api/anytree.cachedsearch api/anytree.resolver api/anytree.walker api/anytree.util importer importer/dictimporter importer/jsonimporter exporter exporter/dictexporter exporter/jsonexporter exporter/dotexporter exporter/mermaidexporter tricks tricks/readonly tricks/yaml tricks/multidim tricks/weightededges tricks/consistencychecks } /home/tkloczko/rpmbuild/BUILD/anytree-2.12.1/docs/intro.rst:53: WARNING: more than one target found for 'any' cross-reference 'children': could be :py:attr:`anytree.node.nodemixin.NodeMixin.children` or :py:attr:`anytree.node.lightnodemixin.LightNodeMixin.children`
/home/tkloczko/rpmbuild/BUILD/anytree-2.12.1/anytree/walker.py:docstring of anytree.walker.Walker.walk:: WARNING: py:class reference target not found: upwards
/home/tkloczko/rpmbuild/BUILD/anytree-2.12.1/anytree/walker.py:docstring of anytree.walker.Walker.walk:: WARNING: py:class reference target not found: common
/home/tkloczko/rpmbuild/BUILD/anytree-2.12.1/anytree/walker.py:docstring of anytree.walker.Walker.walk:: WARNING: py:class reference target not found: downwards
done
build succeeded, 5 warnings.

You can peak on fixes that kind of issues in other projects
RDFLib/rdflib-sqlalchemy#95
RDFLib/rdflib#2036
click-contrib/sphinx-click@abc31069
frostming/unearth#14
jaraco/cssutils#21
latchset/jwcrypto#289
latchset/jwcrypto#289
pypa/distlib@98b9b89f
pywbem/pywbem#2895
sissaschool/elementpath@bf869d9e
sissaschool/xmlschema@42ea98f2
sqlalchemy/sqlalchemy@5e88e6e8

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

1 participant