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

Problem of quotes inside the code of use_python() ? #1749

Open
gael-millot opened this issue Feb 26, 2025 · 2 comments
Open

Problem of quotes inside the code of use_python() ? #1749

gael-millot opened this issue Feb 26, 2025 · 2 comments

Comments

@gael-millot
Copy link

gael-millot commented Feb 26, 2025

reticulate 1.41.0
R 4.4.2
Windows 11 24H2 26100.3194
Python 3.11.5 (windows install by anaconda)

When using reticulate::use_python() with a path that exists (I double checked), I have this error:

> reticulate::use_python(python = "C:/ProgramData/anaconda3/python.exe")

# >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<<

    Traceback (most recent call last):
      File "C:\PROGRA~3\ANACON~1\Lib\site-packages\conda\exception_handler.py", line 17, in __call__
        return func(*args, **kwargs)
               ^^^^^^^^^^^^^^^^^^^^^
      File "C:\PROGRA~3\ANACON~1\Lib\site-packages\conda\cli\main.py", line 54, in main_subshell
        parser = generate_parser(add_help=True)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "C:\PROGRA~3\ANACON~1\Lib\site-packages\conda\cli\conda_argparse.py", line 127, in generate_parser
        configure_parser_plugins(sub_parsers)
      File "C:\PROGRA~3\ANACON~1\Lib\site-packages\conda\cli\conda_argparse.py", line 354, in configure_parser_plugins
        else set(find_commands()).difference(plugin_subcommands)
                 ^^^^^^^^^^^^^^^
      File "C:\PROGRA~3\ANACON~1\Lib\site-packages\conda\cli\find_commands.py", line 71, in find_commands
        for entry in os.scandir(dir_path):
                     ^^^^^^^^^^^^^^^^^^^^
    OSError: [WinError 123] The filename, directory name, or volume label syntax is incorrect: 'C:\\Users\\gmillot\\AppData\\Local\\Pandoc"'

`$ C:\PROGRA~3\ANACON~1\Scripts\conda-script.py info --base`


An unexpected error has occurred. Conda has prepared the above report.
If you suspect this error is being caused by a malfunctioning plugin,
consider using the --no-plugins option to turn off plugins.

Example: conda --no-plugins install <package>

Alternatively, you can set the CONDA_NO_PLUGINS environment variable on
the command line to run the command without plugins enabled.

Example: CONDA_NO_PLUGINS=true conda install <package>


No report sent. To permanently opt-out, use

    $ conda config --set report_errors false

Warning messages:
1: In readLines(rf) :
  incomplete final line found on 'C:\Users\gmillot\AppData\Local\Temp\RtmpOUq05I\file9bc6e9d57d8'
2: In system2(conda, c("info", "--base"), stdout = TRUE) :
  running command '"C:/ProgramData/anaconda3/condabin/conda.bat" info --base' had status 1
> 
> system2(conda, c("info", "--base"), stdout = TRUE)

To find Pandoc followed by a double quote in the error message

OSError: [WinError 123] The filename, directory name, or volume label syntax is incorrect: 'C:\\Users\\gmillot\\AppData\\Local\\Pandoc"'

is weird.
Thanks for your consideration !
Best.

@t-kalinowski
Copy link
Member

This looks like an issue with Conda.

Does the issue reproduce if you use a standard Python installation?

@gael-millot
Copy link
Author

Hi.
Yep. Do not have the problem with the standard installation.
But since I use Python via Conda and I believe I am not the only one to do that, may be at least report this incompatibility ?
Thanks.

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

2 participants