Quarto Render Button

I’m having trouble with the Render button for Quarto Documents in RStudio. When I click Render, I get the following error in the Background Jobs tab (and the output is not created):

'C:/Program' is not recognized as an internal or external command, operable program or batch file.

I don’t fully understand what goes on in the background when I click Render. But from this error, I am guessing that RStudio is attempting to access a path in my Program Files directory, but it is not using quotations around the path (hence the failure at C:/Program).

A few other key pieces of information:

  • I have tried this with both HTML output and PDF output and have encountered the same issue. And for reference, I am trying this with a clean qmd file (with the same content that appears when you create a new Quarto Document in RStudio).
  • I am able to render the qmd file successfully using two other methods. I have successfully rendered the file by issuing commands in the Terminal tab of RStudio (quarto render "[file name].qmd"). I have also successfully rendered the file by running quarto::quarto_render in an R script.
  • I do not have the same problem with the Knit button for R Markdown. When I click Knit on an Rmd file, it successfully creates the output. And I can see in the Render tab of RStudio that quotations were used around file/folder paths:
"C:/Program Files/RStudio/bin/quarto/bin/tools/pandoc" +RTS -K512m -RTS sundries-20220714.knit.md --to latex --from markdown+autolink_bare_uris+tex_math_single_backslash --output sundries-20220714.tex --lua-filter "C:\Users\redacted\AppData\Local\R\win-library\4.2\rmarkdown\rmarkdown\lua\pagebreak.lua" --lua-filter "C:\Users\redacted\AppData\Local\R\win-library\4.2\rmarkdown\rmarkdown\lua\latex-div.lua" --self-contained --highlight-style tango --pdf-engine pdflatex --variable graphics --variable "geometry:margin=1in" 
output file: sundries-20220714.knit.md

And some background details:

  • RStudio version: RStudio 2022.07.1+554 "Spotted Wakerobin" Release (7872775ebddc40635780ca1ed238934c3345c5de, 2022-07-22) for Windows
    Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) QtWebEngine/5.12.8 Chrome/69.0.3497.128 Safari/537.36
  • Quarto version: 1.0.37
  • R version: 4.2.1
  • OS: Windows 11

Does anyone know how I can fix my issue with the Render button?

Thanks for your help.

1 Like

I had the same error earlier today after updating to the most recent version of RStudio. No idea what the cause is, but I found that changing the file name to something else (e.g. hello.qmd) allowed me to render as usual. Maybe give that a try?

1 Like

That worked! After removing spaces in the file name, I don't get the error.

Interesting. When I rendered via the command line, the spaces were fine, and (as expected, just like in R Markdown) the output replaced spaces with hyphens. But the Render button in RStudio seems to have issues with the spaces in the file name.

Thanks for your help!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.

Hi @shiftkey !

Is this still an issue in latest version of the IDE ?

If you could test last daily https://dailies.rstudio.com/ that would be helpful. If this does not work, then we have a bug to fix in the IDE.

Thank you !

Thanks, @cderv! It looks like this is fixed in the latest version. I tested on daily build RStudio-2022.11.0-daily-130. I tested the same qmd file with and without spaces in the file name and was successfully able to render both versions by clicking the Render button in RStudio.

One question, though: This was the first time I've tested one of the daily builds. I installed it in a separate directory from my stable version of RStudio, and I uninstalled the daily build after completing the test. Can I proceed to use the stable version as normal now, or should I reinstall that?

That is great !

If you did not uninstalled your stable version, I think it should be still here. Usually for daily builds on Windows, I am using the portable version (a zip file) so I don't have to uninstall the other version.

Anyway, if the stable version you have is still here and can still be opened, then it should be ok. If you can find it or opened it, just reinstall it. But I think everything is fine. Do you have any issue already ?

Last release is here by the way Download the RStudio IDE - RStudio

1 Like

Yes, the stable version was still there and seems to be working fine so far. Good tip on the zipped version of the daily build. I'll do that next time.

1 Like