quarto-dev / quarto-vscode

Quarto extension for VS Code
https://marketplace.visualstudio.com/items?itemName=quarto.quarto
MIT License
112 stars 11 forks source link

Error when rendering - space in filepath #56

Closed the-sean-c closed 2 years ago

the-sean-c commented 2 years ago

I am trying to use Quarto (v1.0.38) through the Quarto add-in (v1.30.0) in VS Code (v1.70.1) on Windows 10. I installed both Quarto itself and the VS Code add-in, and followed the "Get Started with Quarto" steps that popped up. The first step, "Install Quarto" had a button to verify installation, which completed OK, as did the second step to create a document.

However, the third step "Render a Document" threw the following error:

PS A:\My Documents\quarto_test> cmd /C"C:\Users\First^ Last\AppData\Local\Programs\Quarto\bin\quarto preview walkthrough.qmd --no-browser --no-watch-inputs"
FINDSTR: Cannot open Last
ERROR: NotFound: The system cannot find the path specified. (os error 3)

It appears that the command has an issue with the space between First and Last on the filepath.

the-sean-c commented 2 years ago

I see a similar issue that was resolved in the quarto-cli repo, so maybe the type of issue? https://github.com/quarto-dev/quarto-cli/issues/1134

jjallaire commented 2 years ago

I am not able to reproduce this also running on Windows 10 with the same versions of everything. Here is my command line (running dev version of quarto):

PS C:\Users\jjallaire\Desktop> cmd /C"C:\Users\jjallaire\User^ Apps\quarto-cli\package\dist\bin\quarto preview test.qmd --no-browser --no-watch-inputs"

Perhaps something to do with PowerShell or CMD versions?. Here are mine:

PS C:\Users\jjallaire\Desktop> (Get-ItemProperty -Path HKLM:\SOFTWARE\Microsoft\PowerShell\3\PowerShellEngine -Name 'PowerShellVersion').PowerShellVersion
5.1.19041.1

PS C:\Users\jjallaire\Desktop> CMD --version
Microsoft Windows [Version 10.0.19044.1766]
(c) Microsoft Corporation. All rights reserved.
jjallaire commented 2 years ago

I've made a change to eliminate the need to use the full path to the quarto binary. This is available now in v1.31.0 on the extension gallery. Give that a try and hopefully it will not result in the same error!

the-sean-c commented 2 years ago

Wow, I'm impressed - thanks very much for the quick response!

I've tried this, tried powershell and cmd, tried updating everything, and it hasn't resolved it, unfortunately. Because this seems to also happen on the command line, I think this is actually independent of the vscode extension, so it looks like I've opened this in the wrong repo - I apologize. I'm going to close this here, investigate some more and go to that issue I linked to above.

Thanks!