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

Failed to load config for /refs/... from ... No matching refs found #86

Open
mamueluth opened this issue Mar 8, 2022 · 6 comments
Open

Comments

@mamueluth
Copy link

Hi there.
I have used sphinx-multiversion successfully for another project. However, if I use my slightly adjusted conf.py for the current project I get the following error:

sphinx-multiversion . _build/html
Failed load config for refs/heads/add_multi_version from /run/user/1000/tmp704dtm8d/20ddc6d76d6a0834890d32485b2cb27938c8347d/.
No matching refs found!

This error appears no matter what branches I whitelist. Building with sphinx-build itself however works fine. If someone could hint me in the right direction what could lead to this behavior, I would be thankful.

@georgkrause
Copy link

@mamueluth I have the same problem, but a project which worked fine a few days ago does not work anymore. Can you verify the previous project still works for you? What environment are you running in?

@georgkrause
Copy link

In my case the issue was that I called git describe in conf.py, which doesn't work because of the way sphinx-multiversion handles the generation

@ns-rse
Copy link

ns-rse commented May 9, 2023

I've a similar problem

❱ sphinx-multiversion  . _build/html
Failed load config for refs/tags/v0.1.0 from /tmp/tmpymc6fxg0/d5fe105bfa303c0fda54ce3890930459e4a1546b/docs
Failed load config for refs/tags/v0.1.1 from /tmp/tmpymc6fxg0/5a25d417b251989725b7f1645744b133f607887c/docs
Failed load config for refs/tags/v0.2.0 from /tmp/tmpymc6fxg0/948f32eeb80cef4014107fad8cb3608da305ad67/docs
Failed load config for refs/tags/v0.2.1 from /tmp/tmpymc6fxg0/9bddec01884f4ac8a74f12a3d45c45c12ef526fc/docs
Running Sphinx v6.2.1
WARNING: The config value `version' has type `NoneType', defaults to `str'.
[AutoAPI] Reading files... [100%] /tmp/tmpymc6fxg0/c1147ce61f8f06561611241d6181f4d1824bfb31/recipes/cad1/task1/baseline/__init__.py                                                
[AutoAPI] Mapping Data... [100%] /tmp/tmpymc6fxg0/c1147ce61f8f06561611241d6181f4d1824bfb31/recipes/cad1/task1/baseline/__init__.py                                                 
[AutoAPI] Rendering Data... [  0%] clarity
[AutoAPI] Rendering Data... [  1%] clarity.utils.signal_processing
[AutoAPI] Rendering Data... [  2%] clarity.utils.file_io
[AutoAPI] Rendering Data... [  3%] clarity.utils.audiogram
[AutoAPI] Rendering Data... [  4%] clarity.utils

Other versions start. This is invoking from within docs directory and conf.py is there on the branches and I can build the documentation on an individual basis if I git checkout v0.1.0 (or others) manually.

❱ pip show sphinx-multiversion
Name: sphinx-multiversion
Version: 0.2.4
Summary: Add support for multiple versions to sphinx
Home-page: https://holzhaus.github.io/sphinx-multiversion/
Author: Jan Holthuis
Author-email: [email protected]
License: BSD
Location: /home/neil/.virtualenvs/clarity/lib/python3.11/site-packages
Requires: sphinx
Required-by: 

Not git describe in any of the docs/conf.py either.

@ns-rse
Copy link

ns-rse commented May 10, 2023

I think I might have found the source of my problem.

The docs/conf.py in older tagged versions that are failing don't have the version explicitly set, rather its completely missing...

version = ""

It was only prior to the release of v0.3.0 that I implemented automatic version control (first with versioneer then switched to setuptools_scm).

I wonder if the lack of explicit version is why the build with sphinx-multiversion is failing here?

Is there anyway to work around or fix this? New commits to add the version wouldn't align with the tagged commits I guess the tags could be moved perhaps but am unsure if that is wise (docs aren't bundled into the packages released to PyPI so wouldn't affect that I don't think but am unsure).

@wszarmach-koia
Copy link

If conf.py or its subsidiary code e.g extension for any ref (branch, tag, ) that you want to create documentation for is broken, then such error might occur.
This should be fixed with giving more verbosity over what actually happened.

I knew what happened by debugging exception in load_sphinx_config_worker function in main.py of sphinx_multiversion package (https://github.com/Holzhaus/sphinx-multiversion/blob/cdc9cb591a738e67a5aacc458f9c95e2b88a94c2/sphinx_multiversion/main.py#L73).
Although, I used forked version from: https://github.com/dgarcia360/sphinx-multiversion (v0.3.2)

@BurningEnlightenment
Copy link
Member

Duplicate of #17

@BurningEnlightenment BurningEnlightenment marked this as a duplicate of #17 Oct 6, 2024
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

5 participants