Open EvoArt opened 4 months ago
from this line in the error Start-Process julia -ArgumentList --startup-file=no , --project=C:\Us...
compared with an example from the docs at https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.management/start-process?view=powershell-7.4
Start-Process -FilePath "`$env:comspec" -ArgumentList "/c dir `"%SystemDrive%\Program Files`""
it looks like it's just that the ArgumentList
is not enclosed in quotation marks.
What version of PowerShell are you running? Windows native PowerShell is not 7.4, it is 5.1.
$PSVersionTable.PSVersion
Do you have the same error, when running Quarto, for example at the root of a drive? (The issue might be triggered because of something in your file path, but cannot be sure since we don't have it.)
Thanks for looking into this. I am on version PowerShell 5.1.
I have been attempting to run this in C:\testqmd\test.qmd since I wondered if there were filepath issues.
The same example: -ArgumentList
followed by a list enclosed in quotation marks is on the PowerShell 5.1 docs https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.management/start-process?view=powershell-5.1 (example 7).
The Julia Kernel is directly using Powershell and we need to adapt this command
I believed I tried the Julia notebook and did not get the problem... So maybe there is really a difference between Powershell 7 and 5 🤔
Though PowerShell
is the name for the CLI for PowerShell 5 not 7. So Powershell 5 will be always used.
I need to investigate this more to really understand the problem - especially because our Windows tests seems be passing.
Any update on this issue or any workaround (apart from switching to the Jupyter engine)? I just tried to rerun a very simple Quarto document with the native Julia engine on Windows that was originally written on a Linux computer, but I ran into the same problem.
@devmotion Everything / every update are in the thread.
Thanks, I had hoped there had been already further undocumented progress since the last activity in the thread a month ago.
Based on the error message and the powershell docs, as discussed above it seems that strings in the string array for "-ArgumentList" are incorrectly not enclosed in quotation marks which causes problems e.g. with :
in the --project=C:\...
argument. I wonder what the value of juliaProject
in https://github.com/quarto-dev/quarto-cli/blob/87abd1559c957be4d783516148c503164a2f6bcb/src/execute/julia.ts#L317C26-L317C37 is in the Windows tests on Github - maybe it's a relative path without :
which could explain why the problem does not show up in the Github tests?
FWIW I am on Windows, and I don't see this error. Document renders fine for me without error
I'll try to investigate closer - I am not sure why this would be working on my windows and not others if this is a quote issue.
I believe this could be due with Space in the project use, or any other element in the call. I can at least reproduce with a space powershell
> $env:QUARTO_JULIA_PROJECT="C:\Users\chris\Documents\test-dir with space"
> quarto render index.qmd --no-execute-daemon
Starting julia control server process. This might take a while...
ERROR: Start-Process : Impossible de trouver un param�tre positionnel acceptant l'argument ��with��.
Au caract�re Ligne:1 : 1
+ Start-Process julia -ArgumentList --startup-file=no , --project=C:\Us ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument : (:) [Start-Process], ParameterBindingException
+ FullyQualifiedErrorId : PositionalParameterNotFound,Microsoft.PowerShell.Commands.StartProcessCommand
Stack trace:
Au caract�re Ligne:1 : 1
+ Start-Process julia -ArgumentList --startup-file=no , --project=C:\Us ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument : (:) [Start-Process], ParameterBindingException
+ FullyQualifiedErrorId : PositionalParameterNotFound,Microsoft.PowerShell.Commands.StartProcessCommand
at startOrReuseJuliaServer (file:///C:/Users/chris/Documents/DEV_R/quarto-cli/src/execute/julia.ts:337:15)
at eventLoopTick (ext:core/01_core.js:153:7)
at async getJuliaServerConnection (file:///C:/Users/chris/Documents/DEV_R/quarto-cli/src/execute/julia.ts:423:22)
at async executeJulia (file:///C:/Users/chris/Documents/DEV_R/quarto-cli/src/execute/julia.ts:516:16)
at async Object.execute (file:///C:/Users/chris/Documents/DEV_R/quarto-cli/src/execute/julia.ts:141:16)
at async renderExecute (file:///C:/Users/chris/Documents/DEV_R/quarto-cli/src/command/render/render-files.ts:232:25)
at async renderFileInternal (file:///C:/Users/chris/Documents/DEV_R/quarto-cli/src/command/render/render-files.ts:592:35)
at async renderFiles (file:///C:/Users/chris/Documents/DEV_R/quarto-cli/src/command/render/render-files.ts:325:9)
at async renderProject (file:///C:/Users/chris/Documents/DEV_R/quarto-cli/src/command/render/project.ts:441:23)
at async Command.actionHandler (file:///C:/Users/chris/Documents/DEV_R/quarto-cli/src/command/render/cmd.ts:248:26)
so definitely some quoting issue to fix. I'll target this, and we'll see if it fixes all of your errors here.
https://github.com/quarto-dev/quarto-cli/issues/10489 seems to be a duplicate. There's a workaround described in https://github.com/quarto-dev/quarto-cli/issues/10489#issuecomment-2288922426 (indeed changing the -ArgumentList
) that seems to fix the problem.
It seems that the resourcePath("julia/quartonotebookrunner.jl")
in the environment where the error occurs might include a space in the path.
In my environment, Quarto (installed via winget) is located in C:\Program Files\Quarto
.
❯ (Get-Command quarto).Source
C:\Program Files\Quarto\bin\quarto.exe
Therefore, the resourcePath("julia/quartonotebookrunner.jl")
becomes:
C:\Program Files\Quarto\share\julia\quartonotebookrunner.jl
which includes a space.
Bug description
Hi there,
I have recently started trying to use the native julia engine to render quarto docs, but so far have not managed to do so. Currently, the problem seems to be with the
Start-Process
function.Any advice would be greatly appreciated, and many, many thanks for the general awesomeness of Quarto.
Steps to reproduce
I have the following test.qmd file
Starting julia control server process. This might take a while... ERROR: Start-Process : A positional parameter cannot be found that accepts argument 'System.Object[]'.
At line:1 char:1
Stack trace: At line:1 char:1
Your environment
IDE:
VSCode Version: 1.88.1 (user setup) Commit: e170252f762678dec6ca2cc69aba1570769a5d39 Date: 2024-04-10T17:41:02.734Z Electron: 28.2.8 ElectronBuildId: 27744544 Chromium: 120.0.6099.291 Node.js: 18.18.2 V8: 12.0.267.19-electron.0 OS: Windows_NT x64 10.0.19045
OS:
Edition Windows 10 Enterprise Version 22H2 Installed on 11/03/2021 OS build 19045.4529 Experience Windows Feature Experience Pack 1000.19058.1000.0
Hardware:
Device name 5CG0276F8T Processor Intel(R) Core(TM) i7-8665U CPU @ 1.90GHz 2.11 GHz Installed RAM 16.0 GB (15.8 GB usable) Device ID 44dfe63b-6a91-42b9-8fc5-0799aeec7c4d Product ID 00330-80000-00000-AA035 System type 64-bit operating system, x64-based processor
Quarto check output