You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When producing multiple outputs for side-by-side comparison, I prefer to run my utils/render-all-formats.ts script from a parent directory.
However, I'm currently unable to run a knitr-based notebook using a relative path.
The error is
Error in rmarkdown:::abs_path(input) :
The file 'baz/foo.qmd' does not exist.
but the file does exist, and running rmarkdown:::abs_path('baz/foo.qmd') directly in R is okay.
I only somewhat regret bisecting this over a slow internet connection. I think it will be no surprise that the bad commit seems to be "create ProjectContext in single-file mode to guarantee engine and target caching" a28ac25. Two big steps forward and a baby step back!
Steps to reproduce
Minimal repro: put any knitr-based notebook in a subdirectory, e.g. this baz/foo.qmd
I'm not sure how to write a regression test for this, since it's about invocation rather than the content of the example.
Expected behavior
It should render the qmd inside the directory.
Actual behavior
Error in rmarkdown:::abs_path(input) :
The file 'baz/foo.qmd' does not exist.
Calls: .main -> execute -> setwd -> dirname -> <Anonymous>
Execution halted
ERROR: Error
at renderFiles (file:///Users/gordon/src/quarto-cli/src/command/render/render-files.ts:350:23)
at eventLoopTick (ext:core/01_core.js:153:7)
at async render (file:///Users/gordon/src/quarto-cli/src/command/render/render-shared.ts:102:18)
at async Command.actionHandler (file:///Users/gordon/src/quarto-cli/src/command/render/cmd.ts:248:26)
at async Command.execute (file:///Users/gordon/src/quarto-cli/src/vendor/deno.land/x/cliffy@v1.0.0-rc.3/command/command.ts:1948:7)
at async Command.parseCommand (file:///Users/gordon/src/quarto-cli/src/vendor/deno.land/x/cliffy@v1.0.0-rc.3/command/command.ts:1780:14)
at async quarto (file:///Users/gordon/src/quarto-cli/src/quarto.ts:156:3)
at async file:///Users/gordon/src/quarto-cli/src/quarto.ts:170:5
at async mainRunner (file:///Users/gordon/src/quarto-cli/src/core/main.ts:35:5)
at async file:///Users/gordon/src/quarto-cli/src/quarto.ts:160:3
Your environment
MacOS Sonoma 14.4.1
Quarto check output
Quarto 99.9.9
[✓] Checking versions of quarto binary dependencies...
Pandoc version 3.1.13: 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: 99.9.9
fatal: not a git repository (or any of the parent directories): .git
Path: /Users/gordon/src/quarto-cli/package/dist/bin
[✓] Checking tools....................OK
TinyTeX: v2024.04
Chromium: (not installed)
[✓] Checking LaTeX....................OK
Using: TinyTex
Path: /Users/gordon/Library/TinyTeX/bin/universal-darwin
Version: 2024
[✓] Checking basic markdown render....OK
[✓] Checking Python 3 installation....OK
Version: 3.9.6
Path: /Library/Developer/CommandLineTools/usr/bin/python3
Jupyter: 5.7.1
Kernels: python3
(|) Checking Jupyter engine render..../Users/gordon/Library/Python/3.9/lib/python/site-packages/urllib3/__init__.py:35: NotOpenSSLWarning: urllib3 v2 only supports OpenSSL 1.1.1+, currently the 'ssl' module is compiled with 'LibreSSL 2.8.3'. See: https://github.com/urllib3/urllib3/issues/3020
warnings.warn(
[✓] Checking Jupyter engine render....OK
[✓] Checking R installation...........OK
Version: 4.3.2
Path: /Library/Frameworks/R.framework/Resources
LibPaths:
- /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library
knitr: 1.45
rmarkdown: 2.25
[✓] Checking Knitr engine render......OK
The text was updated successfully, but these errors were encountered:
cscheid
changed the title
quarto run fails with relative path and knitr-based notebook.
quarto render fails with relative path and knitr-based notebook.
May 3, 2024
I just ran into this as well. Using the Render button in RStudio worked but quarto_render() or quarto render didn't and required adding the empty _quarto.yml file.
In my case I was also trying to run these in a different directory in a withr::with_dir() call, which wasn't helped by adding an empty _quarto.yml file in the root of the project.
Bug description
When producing multiple outputs for side-by-side comparison, I prefer to run my
utils/render-all-formats.ts
script from a parent directory.However, I'm currently unable to run a
knitr
-based notebook using a relative path.The error is
but the file does exist, and running
rmarkdown:::abs_path('baz/foo.qmd')
directly in R is okay.I only somewhat regret bisecting this over a slow internet connection. I think it will be no surprise that the bad commit seems to be "create ProjectContext in single-file mode to guarantee engine and target caching" a28ac25. Two big steps forward and a baby step back!
Steps to reproduce
Minimal repro: put any knitr-based notebook in a subdirectory, e.g. this
baz/foo.qmd
Then run
I'm not sure how to write a regression test for this, since it's about invocation rather than the content of the example.
Expected behavior
It should render the qmd inside the directory.
Actual behavior
Your environment
MacOS Sonoma 14.4.1
Quarto check output
The text was updated successfully, but these errors were encountered: