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

Better error when using conda without an environment file #9008

Closed
stsewd opened this issue Mar 10, 2022 · 5 comments · Fixed by #10979
Closed

Better error when using conda without an environment file #9008

stsewd opened this issue Mar 10, 2022 · 5 comments · Fixed by #10979
Assignees
Labels
Accepted Accepted issue on our roadmap Improvement Minor improvement to code

Comments

@stsewd
Copy link
Member

stsewd commented Mar 10, 2022

In this build https://readthedocs.org/projects/test-builds/builds/16326429/ I'm using coda, but I didn't define the environment file in the config file, so it gave me a generic error

The error came from

inputfile = codecs.open(
os.path.join(
self.checkout_path,
self.config.conda.environment,
),
encoding='utf-8',
mode='r',
)

We should probably require using conda.environment when using build.tools.python = conda

@stsewd stsewd added the Improvement Minor improvement to code label Mar 10, 2022
@humitos humitos added the Accepted Accepted issue on our roadmap label Mar 10, 2022
@humitos
Copy link
Member

humitos commented Mar 10, 2022

We should probably require using conda.environment when using build.tools.python = conda

This sounds like the right approach to me as well! 💯

@humitos
Copy link
Member

humitos commented Feb 21, 2023

The other way should also be considered probably: defining conda.environment but using build.tools.python: "3.8". See #10047 (comment)

@humitos
Copy link
Member

humitos commented Jul 3, 2023

When working on this issue, we should also take a look at #10502 which is strongly related.

@humitos
Copy link
Member

humitos commented Aug 3, 2023

Something similar happens when the Git submodule does not exist: https://github.com/readthedocs/readthedocs.org/pull/10594/files#r1282428289 -- The user gets a weird error.

I noting this here so we don't forget to improve this error when working on this.

@humitos
Copy link
Member

humitos commented Aug 26, 2023

This is another issue related to better error messaging on the config file #8595

@humitos humitos added this to the YAML File Completion milestone Aug 26, 2023
@humitos humitos self-assigned this Jan 2, 2024
@humitos humitos moved this from Planned to Needs review in 📍Roadmap Jan 2, 2024
@ericholscher ericholscher linked a pull request Jan 3, 2024 that will close this issue
humitos added a commit that referenced this issue Jan 11, 2024
* Config: better validation error for `conda.environment`

Closes #9008

* Use `dedent` and `split`
@github-project-automation github-project-automation bot moved this from Needs review to Done in 📍Roadmap Jan 11, 2024
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
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants