Skip to content

Fix normalizePath null call with missing conda #1803

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

Merged
merged 2 commits into from
Jun 2, 2025

Conversation

tl-hbk
Copy link
Contributor

@tl-hbk tl-hbk commented Jun 2, 2025

I was trying to use reticulate with a pixi env which only populates conda-meta/history with

// not relevant for pixi but for `conda run -p`

I have options(reticulate.conda_binary = conda) set to a copy of micromamba.exe to handle the conda related operations but when use_python tries to get the conda root/binary info it passes NULL to normalizePath if it can't find conda automatically, which causes the following error Error in path.expand(path) : invalid 'path' argument which is mentioned in #1184

 1: source("src/r/conda.R")
 2: withVisible(eval(ei, envir))
 3: eval(ei, envir)
 4: eval(ei, envir)
 5: conda.R#9: use_python(pixi_env, required = TRUE)
 6: python_config(python)
 7: python_munge_path(python)
 8: get_python_conda_info(python)
 9: normalizePath(conda, winslash = "/", mustWork = FALSE)
10: path.expand(path)

Related issue:
#1650

@t-kalinowski
Copy link
Member

t-kalinowski commented Jun 2, 2025

Thanks for the PR! Can you please add a NEWS item?

@tl-hbk
Copy link
Contributor Author

tl-hbk commented Jun 2, 2025

Thanks for the PR! Can you please add a NEWS item?

Sure I'll go ahead and add that

@tl-hbk
Copy link
Contributor Author

tl-hbk commented Jun 2, 2025

@t-kalinowski the NEWS file has been udpated

@t-kalinowski t-kalinowski merged commit 32375b8 into rstudio:main Jun 2, 2025
14 of 16 checks passed
@t-kalinowski
Copy link
Member

Thank you!

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

Successfully merging this pull request may close these issues.

2 participants