quarto check: ERROR: SyntaxError: Unexpected token ' ', " "... is not valid JSON

What could be causing this error of Quatro (for Windows)

`

quarto check all

[>] Checking versions of quarto binary dependencies...
Pandoc version 2.19.2: OK
Dart Sass version 1.32.8: OK
[>] Checking versions of quarto dependencies......OK
[>] Checking Quarto installation......OK
Version: 1.3.91
Path: C:\Program Files\Quarto\bin
CodePage: 1251

[>] Checking basic markdown render....OK

ERROR: SyntaxError: Unexpected token ' ', " "... is not valid JSON
`

This relates to Cyrillic characters and some element in the test has probably encountered a character that it didn't expect.

Well, this is hardly even in the case described above under Windows 10. Quarto works much more flexibly with a variety of encodings. In any case, it now allows you to fill even the names of chunks in Cyrillic, which cannot be done in Rmarkdown.

I checked under Windows 11 on another machine and everything is fine there:

`D:\Users\arodionov\Documents\Projects\22.08_EDU_scorecard>quarto check all

[>] Checking Quarto installation......OK
Version: 1.2.258
Path: C:\Program Files\RStudio\resources\app\bin\quarto\bin
CodePage: 1251

[>] Checking basic markdown render....OK

[>] Checking Python 3 installation....(None)

  Unable to locate an installed version of Python 3.
  Install Python 3 from https://www.python.org/downloads/

[>] Checking R installation...........OK
Version: 4.2.2
Path: C:/R/R-4.2
LibPaths:
- C:/R/R-4.2/library
rmarkdown: 2.19

[>] Checking Knitr engine render......OK
`
Maybe it has something to do with the failure of JavaScript or packages associated with it R.

Hard for me to say, not being a Win user. If it’s working on one but not the other, try to conform configuration to the good one, says the man who doesn’t have to do it himself.

@Alex_Rodionov This error happens only when running quarto check or at each rendering ?

Can you try the latest release of Quarto (1.2.313) ? and maybe the pre-release ?
See Quarto - Download Quarto

This commands quarto check should run some internal stuff. I am not sure where the error could be except in Quarto code directly.

Please do try newer version to see if this is already fixed maybe.

I install pre-release Quarto (Version: 1.3.91). Error occurs both when check and render a Jupyter notebook after execution for R, Python, or Julia lang codes.

Can you open an issue in Quarto repo giving us detail on your environment and installation ? We definitely need to look into this. This is issue is not expected - quarto check should be without error.

I have exactly the same error when doing

quarto check                                                                                                                             

[>] Checking versions of quarto binary dependencies...
      Pandoc version 2.19.2: OK
      Dart Sass version 1.32.8: OK
[>] Checking versions of quarto dependencies......OK
[>] Checking Quarto installation......OK
      Version: 1.3.97
      Path: C:\Program Files\Quarto\bin
      CodePage: 1252

[>] Checking basic markdown render....OK

ERROR: SyntaxError: Unexpected token '', ""... is not valid JSON

Thanks @vaulot . Definitely something weird happening here. I still need to reproduce

Can you share more information on your system and environment ?

How do you install Quarto by the way ? Using exe file from the website ?

Any information that can help me reproduce to debug will be appreciated.

Thanks for opening the issue by the way

Better to share when you cross post though.

@vaulot @Alex_Rodionov both the issue arise at the time of testing of Jupyter capabilities.

can you run quarto check jupyter directly ? What does it return ?

Thank you

Sorry for the lack of information. I am continuing on GitHub issue...

I have installed several versions of Rstudio Desktop including even the latest daytime versions from Quarto as well as Quarto itself. But result on this Windows 10 machine every time with this error.

I will try to correctly describe the problem on github.

I checked and I had the same reason as stated in ERROR: SyntaxError: Unexpected token '', ""... is not valid JSON when doing quarto check · Issue #3936 · quarto-dev/quarto-cli · GitHub. As soon as I deleted the D:\Users\Alexander\AppData\Local directory. And again the failed file D:\Users file \Alexander\AppData\Local\quarto\sass\index.json filled with "[NUL]" codes.

The new test run was successful and a new directory D:\Users\Alexander\AppData\Local was created index.json with the correct code.

1 Like

It should be fixed in v1.3.101 also now - there was indeed an issue. Thank you all !

I downloaded the latest version of RStudio Desktop as of January 18th and it was able to fix the file D:\Users file \Alexander\AppData\Local\quarto\sass\index.json on its own when I ran

quarto check all

But the version of the quarto:

`>quarto --version

1.2.280`

1 Like

It is a caching issue we had, so possibly by reinstalling you cleaned the cache, and everything is good, but we do fix something related to sass caching in 1.3.101

Glad it works for you !

1 Like

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.