Skip to content

Wrong sphinx.configuration path causes not correct error message #8352

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

Closed
NickVeld opened this issue Jul 18, 2021 · 7 comments
Closed

Wrong sphinx.configuration path causes not correct error message #8352

NickVeld opened this issue Jul 18, 2021 · 7 comments
Labels
Accepted Accepted issue on our roadmap Improvement Minor improvement to code

Comments

@NickVeld
Copy link

Details

Expected Result

A description of what you wanted to happen

After .readthedocs.yml creation the build is passed too.

Actual Result

A description of what actually happened

After .readthedocs.yml creation the build is failed because sphinx starts opening docs/index.rst instead of docs/source/index.rst.

From the logs of the failed build:

sphinx.errors.SphinxError: master file /home/docs/checkouts/readthedocs.org/user_builds/battery-handyman/checkouts/latest/docs/index.rst not found

After .readthedocs.yml deletion everything works fine. See the passed build.

@astrojuanlu
Copy link
Contributor

Hi @NickVeld ! The problem was here:

sphinx:
   configuration: docs/conf.py

NickVeld/battery_handyman@8add825#diff-cde814ef2f549dc093f5b8fc533b7e8f47e7b32a8081e0760e57d5c25a1139d9L8-L9

Your configuration is in docs/source/conf.py instead. Can you confirm that restoring the .readthedocs.yaml with the correct path for conf.py fixes the issue?

@astrojuanlu astrojuanlu added Needed: more information A reply from issue author is required Support Support question labels Jul 18, 2021
@NickVeld
Copy link
Author

Hello, @astrojuanlu

Yeah, thanks for the hint! After the path fix the docs was built successfully.
Then I am renaming the issue to the suggestion to provide more readable error for this case.

But the strangest thing is that the build is passed with the following setting in the Admin Web UI:
image

@no-response no-response bot removed the Needed: more information A reply from issue author is required label Jul 18, 2021
@NickVeld NickVeld changed the title .readthedocs.yml creation breaks building Wrong sphinx.configuration path causes not correct error message Jul 18, 2021
@stsewd
Copy link
Member

stsewd commented Jul 19, 2021

But the strangest thing is that the build is passed with the following setting in the Admin Web UI:

When not using a config file, a lot of magic happens.... Like we try to find another config file if the one you provided doesn't exist, that's for backwards compatibility.

@stsewd stsewd added Improvement Minor improvement to code and removed Support Support question labels Jul 19, 2021
@NickVeld
Copy link
Author

NickVeld commented Jul 20, 2021

I see, thanks

Maybe the following is better:

In case blank field or incorrect value we find it for you.

instead of

Leave blank if you want us to find it for you.

@stale
Copy link

stale bot commented Mar 2, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the Status: stale Issue will be considered inactive soon label Mar 2, 2022
@stale stale bot closed this as completed Apr 16, 2022
@stsewd stsewd removed the Status: stale Issue will be considered inactive soon label Apr 18, 2022
@stsewd stsewd reopened this Apr 18, 2022
@humitos
Copy link
Member

humitos commented Apr 19, 2022

@stsewd I think it's fine to close this issue. If not, what's the actionable we have to do from our side to be able to close it?

@stsewd
Copy link
Member

stsewd commented Apr 19, 2022

@humitos we should raise an exception or warning if the configuration file that the user set didn't exist

@humitos humitos added Bug A bug Accepted Accepted issue on our roadmap and removed Bug A bug labels Apr 19, 2022
humitos added a commit that referenced this issue Jan 24, 2024
This validation should eventually happen at the Read the Docs config file.
We are not there, but at least we are giving a better error message to users.

Closes #8352
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Accepted Accepted issue on our roadmap Improvement Minor improvement to code
Projects
None yet
Development

No branches or pull requests

4 participants