Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VS Code: Quarto - mermaid - docx #529

Closed
younits opened this issue Sep 2, 2024 · 4 comments
Closed

VS Code: Quarto - mermaid - docx #529

younits opened this issue Sep 2, 2024 · 4 comments

Comments

@younits
Copy link

younits commented Sep 2, 2024

Hello everybody,

This is my first issue report ever, so please be gentle if I may have done something very wrong.

I have created a Quarto document that also includes a Mermaid diagram and want to render it to a docx. It works by rendering it to an HTML document, but nothing gets it working into a docx file (-> very slow with throwing an error)

This is the error message:

ERROR: Couldn't find open server.
Chrome process error: 

Stack trace:
Chrome process error: 
    at criClient (file:///C:/Users/Y/AppData/Local/Programs/Quarto/bin/quarto.js:39317:15)
    at eventLoopTick (ext:core/01_core.js:153:7)
    at async file:///C:/Users/Y/AppData/Local/Programs/Quarto/bin/quarto.js:39279:22
    at async Semaphore.runExclusive (file:///C:/Users/Y/AppData/Local/Programs/Quarto/bin/quarto.js:38956:29)
    at async Object.createPngsFromHtml (file:///C:/Users/Y/AppData/Local/Programs/Quarto/bin/quarto.js:39544:42)
    at async makePng (file:///C:/Users/Y/AppData/Y/Programs/Quarto/bin/quarto.js:74827:70)
    at async makeDefault (file:///C:/Users/Y/AppData/Local/Programs/Quarto/bin/quarto.js:74887:24)
    at async Object.cell (file:///C:/Users/Y/AppData/Local/Programs/Quarto/bin/quarto.js:74910:20)
    at async Promise.all (index 0)
    at async Object.document (file:///C:/Users/Y/AppData/Local/Programs/Quarto/bin/quarto.js:39839:25)

I have made a dummy program, so you see my problem.

---
title: "Hello"
format: docx
---


{{< pagebreak >}}

## Title 1 {.unnumbered}



{{< pagebreak >}}

## Title 2

This is a very, very big text.

{{< pagebreak >}}

## Title 3
### Title 3.1



```{mermaid}
flowchart TD

    X[X]
    Y[Y]
    A[A]
    B[B]
    C[C]
    D[D]
    E[E]

    X--> A
    Y--> A
    A-->|BLABLA|B
    B--> C
    B-->|BLABLA WHY|D
    B-->|BLABLA WHY WHY|E

I have also really googled and could find #1822, where you should do this:

wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
apt install ./google-chrome-stable_current_amd64.deb

However, here an error for apt is coming up:
"apt : The term 'apt' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling
of the name, or if a path was included, verify that the path is correct and try again."
(wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb - works but did not solve the problem)

I do not know what to do anymore. Any rendering of the mermaid does not work in Quarto anymore.
(I also have a college with the same set up, same quarto version but rendering works.)

Here also Quarto check - I do not know if there is a problem in there:

Quarto 1.5.56
[>] Checking versions of quarto binary dependencies...
      Pandoc version 3.2.0: OK
      Dart Sass version 1.70.0: OK
      Deno version 1.41.0: OK
      Typst version 0.11.0: OK
[>] Checking versions of quarto dependencies......OK
[>] Checking Quarto installation......OK
      Version: 1.5.56
      Path: C:\Users\Y\AppData\Local\Programs\Quarto\bin
      CodePage: 1252

[>] Checking tools....................OK
      TinyTeX: v2024.06
      Chromium: 869685

[>] Checking LaTeX....................OK
      Using: TinyTex
      Path: C:\Users\Y\AppData\Roaming\TinyTeX\bin\windows\
      Version: 2024

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

WARN: Specified QUARTO_PYTHON '/usr/bin/python3' does not exist
WARN: No python binary found in specified QUARTO_PYTHON location '/usr/bin/python3'
[>] Checking Python 3 installation....OK
      Version: 3.12.4
      Path: C:/Users/Y/AppData/Local/Programs/Python/Python312/python.exe
      Jupyter: (None)

      Jupyter is not available in this Python installation.
      Install with py -m pip install jupyter

[>] Checking R installation...........OK
      Version: 4.3.2
      Path: C:/Users/Y/AppData/Local/Programs/R/R-4.3.2
      LibPaths:
        - C:/Users/Y/AppData/Local/Programs/R/R-4.3.2/library
      knitr: 1.47
      rmarkdown: 2.27

[>] Checking Knitr engine render......OK

Is there anything I am missing? or should install ?

Thank you in advance!

@younits younits changed the title Quarto - mermaid - docx VS Code: Quarto - mermaid - docx Sep 2, 2024
@cscheid
Copy link
Contributor

cscheid commented Sep 5, 2024

This is a duplicate of quarto-dev/quarto-cli#10573, etc. Upgrade to 1.5.57 and that should go away.

@cscheid cscheid closed this as completed Sep 5, 2024
@younits
Copy link
Author

younits commented Sep 6, 2024

@cscheid Thanks for the tip - unfortunately, I am still having the same problem after updating to 1.5.57. What do I need to do now ?

@cscheid
Copy link
Contributor

cscheid commented Sep 6, 2024

Are you positive you're using 1.5.57? I ask because, to be frank, your comment indicates you don't have a ton of experience with your computing setup:

However, here an error for apt is coming up:
"apt : The term 'apt' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling
of the name, or if a path was included, verify that the path is correct and try again."
(wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb - works but did not solve the problem)

at criClient (file:///C:/Users/Y/AppData/Local/Programs/Quarto/bin/quarto.js:39317:15)

C:/Users/... indicates that you're running Windows. apt is a Linux program. I think you have more fundamental issues you're confused about here.

@ruipcarvalho
Copy link

@cscheid, I'm getting the same error, and I have upgraded to 1.5.57 (I am on Windows 11)

Essentially, Quarto takes very long time to parse files with mermaid diagrams and eventually gives the error:

ERROR: Couldn't find open server.
Chrome process error:

Stack trace:
Chrome process error:
at criClient (file:///C:/Program%20Files/Quarto/bin/quarto.js:39317:15)
at eventLoopTick (ext:core/01_core.js:153:7)
at async file:///C:/Program%20Files/Quarto/bin/quarto.js:39279:22
at async Semaphore.runExclusive (file:///C:/Program%20Files/Quarto/bin/quarto.js:38956:29)
at async Object.createPngsFromHtml (file:///C:/Program%20Files/Quarto/bin/quarto.js:39544:42)
at async makePng (file:///C:/Program%20Files/Quarto/bin/quarto.js:74827:70)
at async makeDefault (file:///C:/Program%20Files/Quarto/bin/quarto.js:74887:24)
at async Object.cell (file:///C:/Program%20Files/Quarto/bin/quarto.js:74910:20)
at async Promise.all (index 0)
at async Object.document (file:///C:/Program%20Files/Quarto/bin/quarto.js:39839:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants