[Python] Issues Running Code Chunks in Quarto on Positron

Discussão em 'Python' iniciado por Stack, Março 6, 2025.

  1. Stack

    Stack Membro Participativo

    I’m encountering issues using Quarto within Positron when trying to include R or Python code chunks in my .qmd documents. When I run the quarto preview command, I receive different errors depending on the language of the chunk.

    Example .qmd File:

    ---
    title: "Test Document"
    format: html
    ---

    ## R Code

    ```{r}
    print("Hello, R!")
    ```

    ## Python Code

    ```{python}
    print("Hello, Python!")
    ```


    Errors Received:


    • R: I receive the following error when attempting to execute an R code chunk:

      Error in dir.exists(x) : file name conversion problem – name too long? Calls: … lapply -> FUN -> dir_exists -> -> dir.exists Execution halted


    • Python: When running a Python code chunk, I encounter this error:

      ERROR: Cannot access the file. (os error 1920): stat ‘C:\Users\erik4\AppData\Local\Microsoft\WindowsApps\python3.12.exe’ Stack trace:

    What I've Tried:

    • Verified that both Python and R are installed correctly and are in the system PATH.
    • Checked project's folder permissions.
    • Tried reducing the project path length, but the issue persists.

    Thank you in advance for any help or suggestions!

    R version: 4.4.2 Python version: 3.12.9

    Continue reading...

Compartilhe esta Página