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

Cannot reproduce minimal example #26

Closed
JosiahParry opened this issue Sep 7, 2023 · 4 comments · Fixed by #80
Closed

Cannot reproduce minimal example #26

JosiahParry opened this issue Sep 7, 2023 · 4 comments · Fixed by #80

Comments

@JosiahParry
Copy link

Following the minimal example results in the following error:

Error running filter /Applications/quarto/share/filters/main.lua:
Error running filter /Users/josiahparry/github/jebby/webr:
Could not find executable /Users/josiahparry/github/jebby/webr
stack traceback:
        /Applications/quarto/share/filters/main.lua:4030: in function </Applications/quarto/share/filters/main.lua:4009>
        [C]: in ?
        [C]: in method 'walk'
        /Applications/quarto/share/filters/main.lua:171: in function 'run_emulated_filter'
        /Applications/quarto/share/filters/main.lua:449: in local 'callback'
        /Applications/quarto/share/filters/main.lua:454: in upvalue 'run_emulated_filter_chain'
        /Applications/quarto/share/filters/main.lua:495: in function </Applications/quarto/share/filters/main.lua:476>
stack traceback:
        /Applications/quarto/share/filters/main.lua:171: in function 'run_emulated_filter'
        /Applications/quarto/share/filters/main.lua:449: in local 'callback'
        /Applications/quarto/share/filters/main.lua:454: in upvalue 'run_emulated_filter_chain'
        /Applications/quarto/share/filters/main.lua:495: in function </Applications/quarto/share/filters/main.lua:476>

Are there additional steps to the installation other than ensuring webR are installed via npm i webR and adding the quarto filter?

@coatless
Copy link
Owner

coatless commented Sep 7, 2023

So, I'm unable to reproduce an error like this using one of the example/test documents in the repository.

A few questions:

  1. What is the minimal example being used?
  2. What version of Quarto is being used?
  3. Are you using the Quarto to VS Code extension or RStudio client? What versions are those extensions/clients at?
  4. Are you using knitr or python as the compute engine?
  5. What is your operating system version information?

Feel free to try to render a Quarto example using:

Open in GitHub Codespaces

@JosiahParry
Copy link
Author

  1. The example from the README
---
title: webR in Quarto HTML Documents
format: html
engine: knitr
filters:
  - webr
---

This is a webr-enabled code cell in a Quarto HTML document.

```{webr-r}
fit = lm(mpg ~ am, data = mtcars)
summary(fit)
```
  1. 1.3.450
  2. Quarto in RStudio and VS Code reproduce the same issue
  3. Using the knitr engine as it is specified in the yaml front matter
  4. Apple M1 with Ventura 13.3

@coatless
Copy link
Owner

coatless commented Sep 7, 2023

Thanks, that's very useful!

So, what's going on here is the webr filter is missing from the _extension directory that resides next to where the .qmd document should be.

In particular, we want a folder structure like:

.
├── _extensions
│   └── coatless
│       └── webr
│           ├── _extension.yml
│           ├── ...
│           └── webr.lua
├── test-document.qmd
├── webr-serviceworker.js
└── webr-worker.js

So, if you change directory to where the .qmd file is, then you can add the webr quarto filter by typing into Terminal:

quarto add coatless/quarto-webr

Here's a quick walkthrough video showing the _extension folder next to where the .qmd document is:

ensure-quarto-filter-present-next-to-document

@JosiahParry
Copy link
Author

Simple pathing problem. Thank you <3

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

Successfully merging a pull request may close this issue.

2 participants