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

quarto preview of notebooks fails if qmd with the same name is in the same directory #11218

Open
anhi opened this issue Oct 28, 2024 · 1 comment
Labels
bug Something isn't working needs-repro Issues that are blocked until reporter provides an adequate reproduction

Comments

@anhi
Copy link

anhi commented Oct 28, 2024

Bug description

When converting between .qmd and .ipynb - files, quarto runs into problems when the .qmd file is still present in the same directory.

Steps to reproduce

Start with a .qmd like this:

---
title: Test
subtitle: Test
filters:
  - reveal-header
  - d2
  - pseudocode
preview:
  port: 4200
jupyter: python3
---

```{python}
print("hello, world")
```

then, convert this to .ipynb with

quarto convert test.qmd

previewing then yields an error like this:

❯ quarto preview test.ipynb
pandoc 
  to: html
  output-file: test.html
  standalone: true
  section-divs: true
  html-math-method: mathjax
  wrap: none
  default-image-extension: png
  
metadata
  document-css: false
  link-citations: true
  date-format: long
  lang: en
  title: Test
  subtitle: Test
  preview:
    port: 4200
  
FATAL (/Applications/quarto/share/filters/main.lua:3797) An error occurred:
Could not run /tmp/reveal-header as a JSON filter.
Please make sure the file exists and is executable.

Did you intend 'reveal-header' as a Lua filter in an extension?
If so, make sure you've spelled the name of the extension correctly.

The original Pandoc error follows below.
Error running filter /tmp/reveal-header:
Could not find executable /tmp/reveal-header
Error running filter /Applications/quarto/share/filters/main.lua:
/Applications/quarto/share/filters/main.lua:2639: attempt to call a nil value (global 'crash_with_stack_trace')
stack traceback:
        /Applications/quarto/share/filters/main.lua:2218: in function 'fail'
        /Applications/quarto/share/filters/main.lua:3797: in field 'Pandoc'
        /Applications/quarto/share/filters/main.lua:568: in function 'run_emulated_filter'
        /Applications/quarto/share/filters/main.lua:1334: in local 'callback'
        /Applications/quarto/share/filters/main.lua:1352: in upvalue 'run_emulated_filter_chain'
        /Applications/quarto/share/filters/main.lua:1388: in function </Applications/quarto/share/filters/main.lua:1385>

After removing the test.qmd file with

rm test.qmd

quarto preview works without errors.

Expected behavior

No response

Actual behavior

No response

Your environment

  • OS: MacOS Sequoia

Quarto check output

Quarto 1.5.57
[✓] 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.57
      Path: /Applications/quarto/bin

[✓] Checking tools....................OK
      TinyTeX: (not installed)
      Chromium: (not installed)

[✓] Checking LaTeX....................OK
      Using: Installation From Path
      Path: /Library/TeX/texbin
      Version: 2024

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

[✓] Checking Python 3 installation....OK
      Version: 3.9.19
      Path: /tmp/env/bin/python
      Jupyter: 5.7.2
      Kernels: julia-1.10.5-1.10, julia-1.10, python3

[✓] Checking Jupyter engine render....OK

[✓] Checking R installation...........OK
      Version: 4.4.1
      Path: /opt/homebrew/Cellar/r/4.4.1/lib/R
      LibPaths:
        - /opt/homebrew/lib/R/4.4/site-library
        - /opt/homebrew/Cellar/r/4.4.1/lib/R/library
      knitr: (None)
      rmarkdown: (None)

      The knitr package is not available in this R installation.
      Install with install.packages("knitr")
      The rmarkdown package is not available in this R installation.
      Install with install.packages("rmarkdown")
@anhi anhi added the bug Something isn't working label Oct 28, 2024
@cscheid
Copy link
Collaborator

cscheid commented Oct 28, 2024

This error makes me suspect something else:

FATAL (/Applications/quarto/share/filters/main.lua:3797) An error occurred:
Could not run /tmp/reveal-header as a JSON filter.
Please make sure the file exists and is executable.

Can you share a full example that includes these files that your .qmd is referring to?

@cscheid cscheid added the needs-repro Issues that are blocked until reporter provides an adequate reproduction label Oct 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs-repro Issues that are blocked until reporter provides an adequate reproduction
Projects
None yet
Development

No branches or pull requests

2 participants