Open pranavmishra90 opened 1 year ago
Quarto keeps an index of all project inputs in the .quarto
hidden directory, which for some reason we appear to be having trouble reading.
One thing that is confusing me - in the docker section, there is an error indicating that an include has been specified without a file name. Can you clarify what this error is? I'm wondering whether you perhaps have an error in an include shortcode and that has somehow caused a problem for us when attempting to resolve an input using that index...
Thanks for the quick reply. I was able to find the source of the error with your comment. I'll document it below, along with a possible feature recommendation / enhancement.
There was a jupyter notebook which had a single empty code cell inside. After deleting this file, the quarto preview
and quarto render
commands executed as intended.
.quarto/
directoryI tried several variations on:
.quarto/
chmod 777
wondering if there was a write permission issueNone of these fixed the issue.
Created a new directory at ~/testing
, made a simple index.qmd
file, and tried a quarto render index.qmd
. It worked, showing that quarto itself was not at fault
Starting over with an empty .quarto/
, I reran quarto render
, which produced the JSON error. I then tried to determine which file was the offending one by looking at "what was the most recently modified thing inside of the .quarto/
directory:
# adapted from: https://stackoverflow.com/questions/5566310/how-to-recursively-find-and-list-the-latest-modified-files-in-a-directory-with-s
find . -exec stat --format '%Y :%y %n' "{}" \; | sort -nr | cut -d: -f2- | head
The output was 2023-08-01 07:26:33.749877086 -0500 ./idx/code/python/scvi/phase_2/03 - cell_annotation.ipynb.json
, which I incorrectly assumed was the offending file. This should be considered as the "last correctly processed file". (Foreshadowing) The next file in the directory is the offending one.
Specifically prevented the rendering of that notebook with:
# from _quarto.yml
project:
type: website
output-dir: ./notebook/_site
render:
- "*.qmd"
- "*.md"
- "*.ipynb"
- "!code/python/scvi/phase_2/03 - cell_annotation.ipynb"
This did not work, but blocking the render to the all jupyter notebooks, then specifically just the parent directory did. I had recently created copies of multiple notebooks while testing something, so the titles were all the same, but filenames were different. Thinking this may lead to some sort of error when building the sidebar (though it hasn't before with copies of files), I changed all of the yaml headers.
While going file by file, that's when I reached the empty file. I deleted it and quarto began functioning as intended.
# cd inside of your projects .quarto/ directory
find . -exec stat --format '%Y :%y %n' "{}" \; | sort -nr | cut -d: -f2- | head
The top result is the most recently modified file. Find the file that comes next in the directory. This is the cause of the problem
As an enhancement, can quarto possibly provide the file it was working on rendering which produced the error. This would give an end user a place to start debugging. The JSON error with javascript lines does not provide this level of specificity.
I actually did not know that there is a rapid JSON conversion of the files until digging into this issue. I assumed that it went file by file, as shown by the printed output (STOUT)
quarto preview
Preparing to preview
[ 1/39] notebook/presentations/gene_expression_vs_cluster.qmd
Starting python3 kernel...Done
(continues)
If there was a way to show an error message at the initial quarto preview
/ quarto render
stage, it could be helpful
Thanks for the report. We should definitely improve this error.
Pushing this to 1.5 when we'll have better information about which file is being processed by what part of the code.
I just would like to add that I am also experiencing the same problem. I was following the instructions of the new Manuscript guide when it happened. I "solved it" by restoring the repo to the original.
Bug description
Hi all,
I've been using
quarto
successfully for some time now. On my main machine, I can't seem to perform anyquarto render
orquarto preview
commands. Using VSCode's quarto plugin produces the same error. I also have quarto installed inside of a docker container which produces an error, though a different one.Do not know why a previously functioning quarto is no longer working (details below)
Steps to reproduce
My directory consists of a Git repository with several submodules. The parent / root directory contains a
_quarto.yml
file with the following contentsI use quarto to build a static website, which is rendered in
./notebook/_site
.Command
Expected behavior
Begin rendering the website by going into the subdirectories and rendering .ipynb, .qmd, etc.
Output to
notebook/_site/
Actual behavior
Debian
I also get a similar same output when trying
quarto preview
Docker
VSCode
Produces the same error as listed under 'Debian'.
Your environment
OS: Debian 12 IDE: VSCode 1.80.2 Quarto: 1.3.433
Quarto check output
As a sanity check, I even uninstalled and reinstalled quarto