Repository navigation
sphinx.errors.NoUri #733
Description
Describe the bug
context
I don't know whether this error relates to MyST-Parser, but I began getting this error after MyST-Parser 0.19.0 was released.
expectation
I expected no errors like my previous builds with myst v0.18.1.
https://readthedocs.org/projects/deepmd/builds/19634134/
bug
But instead, the sphinx.errors.NoUri error happens after myst v0.19.0 was released.
https://readthedocs.org/projects/deepmd/builds/19635616/
https://readthedocs.org/projects/deepmd/builds/19635930/
https://readthedocs.org/projects/deepmd/builds/19647300/
Here's an error message I ran into...
Traceback (most recent call last):
File "/home/docs/checkouts/readthedocs.org/user_builds/deepmd/conda/latest/lib/python3.9/site-packages/sphinx/cmd/build.py", line 284, in build_main
app.build(args.force_all, args.filenames)
File "/home/docs/checkouts/readthedocs.org/user_builds/deepmd/conda/latest/lib/python3.9/site-packages/sphinx/application.py", line 347, in build
self.builder.build_update()
File "/home/docs/checkouts/readthedocs.org/user_builds/deepmd/conda/latest/lib/python3.9/site-packages/sphinx/builders/__init__.py", line 308, in build_update
self.build(['__all__'], to_build)
File "/home/docs/checkouts/readthedocs.org/user_builds/deepmd/conda/latest/lib/python3.9/site-packages/sphinx/builders/__init__.py", line 377, in build
self.write(docnames, list(updated_docnames), method)
File "/home/docs/checkouts/readthedocs.org/user_builds/deepmd/conda/latest/lib/python3.9/site-packages/sphinx/builders/latex/__init__.py", line 288, in write
doctree = self.assemble_doctree(
File "/home/docs/checkouts/readthedocs.org/user_builds/deepmd/conda/latest/lib/python3.9/site-packages/sphinx/builders/latex/__init__.py", line 354, in assemble_doctree
self.env.resolve_references(largetree, indexfile, self)
File "/home/docs/checkouts/readthedocs.org/user_builds/deepmd/conda/latest/lib/python3.9/site-packages/sphinx/environment/__init__.py", line 656, in resolve_references
self.apply_post_transforms(doctree, fromdocname)
File "/home/docs/checkouts/readthedocs.org/user_builds/deepmd/conda/latest/lib/python3.9/site-packages/sphinx/environment/__init__.py", line 668, in apply_post_transforms
transformer.apply_transforms()
File "/home/docs/checkouts/readthedocs.org/user_builds/deepmd/conda/latest/lib/python3.9/site-packages/sphinx/transforms/__init__.py", line 80, in apply_transforms
super().apply_transforms()
File "/home/docs/checkouts/readthedocs.org/user_builds/deepmd/conda/latest/lib/python3.9/site-packages/docutils/transforms/__init__.py", line 171, in apply_transforms
transform.apply(**kwargs)
File "/home/docs/checkouts/readthedocs.org/user_builds/deepmd/conda/latest/lib/python3.9/site-packages/sphinx/transforms/post_transforms/__init__.py", line 37, in apply
self.run(**kwargs)
File "/home/docs/checkouts/readthedocs.org/user_builds/deepmd/conda/latest/lib/python3.9/site-packages/myst_parser/sphinx_ext/myst_refs.py", line 80, in run
self.resolve_myst_ref_doc(node)
File "/home/docs/checkouts/readthedocs.org/user_builds/deepmd/conda/latest/lib/python3.9/site-packages/myst_parser/sphinx_ext/myst_refs.py", line 181, in resolve_myst_ref_doc
ref_node = make_refnode(
File "/home/docs/checkouts/readthedocs.org/user_builds/deepmd/conda/latest/lib/python3.9/site-packages/sphinx/util/nodes.py", line 550, in make_refnode
node['refuri'] = builder.get_relative_uri(fromdocname, todocname)
File "/home/docs/checkouts/readthedocs.org/user_builds/deepmd/conda/latest/lib/python3.9/site-packages/sphinx/builders/latex/__init__.py", line 141, in get_relative_uri
return self.get_target_uri(to, typ)
File "/home/docs/checkouts/readthedocs.org/user_builds/deepmd/conda/latest/lib/python3.9/site-packages/sphinx/builders/latex/__init__.py", line 135, in get_target_uri
raise NoUri(docname, typ)
sphinx.errors.NoUri: ('install/install-tf.2.8', None)
Exception occurred:
File "/home/docs/checkouts/readthedocs.org/user_builds/deepmd/conda/latest/lib/python3.9/site-packages/sphinx/builders/latex/__init__.py", line 135, in get_target_uri
raise NoUri(docname, typ)
sphinx.errors.NoUri: ('install/install-tf.2.8', None)
The full traceback has been saved in /tmp/sphinx-err-0n6n9ja3.log, if you want to report the issue to the developers.
Please also report this if it was a user error, so that a better error message can be provided next time.
A bug report can be filed in the tracker at <https://github.com/sphinx-doc/sphinx/issues>. Thanks!problem
Indeed I don't know the reason.
Reproduce the bug
This is my repository: https://github.com/deepmodeling/deepmd-kit/tree/devel/doc
The error happens in this file:
https://github.com/deepmodeling/deepmd-kit/blob/devel/doc/install/install-from-source.md
with this sentence:
You may follow [the instruction](install-tf.2.8.md) or run the script `$deepmd_source_dir/source/install/build_tf.py` to install the corresponding C++ interface.List your environment
The error happens on the Read the doc server.
python 3.9.16
Sphinx 6.1.3
myst-parser 0.19.0
sphinx_rtd_theme 1.2.0
Activity
welcome commentedon Mar 2, 2023
Thanks for opening your first issue here! Engagement like this is essential for open source projects! 🤗
If you haven't done so already, check out EBP's Code of Conduct. Also, please try to follow the issue template as it helps other community members to contribute more effectively.
If your issue is a feature request, others may react to it, to raise its prominence (see Feature Voting).
Welcome to the EBP community! 🎉
chrisjsewell commentedon Mar 2, 2023
Fixed and released cheers