Skip to content

1.6.39 breaks preview in VS Code for filenames with spaces in website project #11554

Closed

Description

@allefeld

Bug description

After installing Quarto 1.6.39 the preview in VS Code no longer works,
for files with spaces in their name in a website project,
at least on first render.

Steps to reproduce

  1. put these files in a directory:

_quarto.yml:

project: 
  type: website

file with spaces.md:

this is `file with spaces.md`

other file with spaces.md:

this is `other file with spaces.md`
  1. open the directory with VS Code as a project
  2. open one of the md-files
  3. run the command "Quarto: Preview"

Expected behavior

The file should be processed and the resulting html file displayed in the "Quarto Preview" tab.

Actual behavior

The file is processed but not displayed

…
Output created: _site/file with spaces.html

Preparing to preview

Watching files for changes
Browse at http://localhost:3449/file with spaces.html
GET: /file (404: Not Found)

The reason is that the preview attempts to show http://localhost:3449/file with spaces.html
which is truncated to http://localhost:3449/file
instead of http://localhost:3449/file%20with%20spaces.html.

Switching between the two md files and previewing them seems to fix it for the rest of the session,
but after closing VS Code and opening the project again, etc., it occurs again.

Your environment

VS Code 1.95.3
Debian 12.8

Quarto check output

Quarto 1.6.39
[✓] Checking environment information...
      Quarto cache location: /home/ca/.cache/quarto
[✓] Checking versions of quarto binary dependencies...
      Pandoc version 3.4.0: OK
      Dart Sass version 1.70.0: OK
      Deno version 1.46.3: OK
      Typst version 0.11.0: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
      Version: 1.6.39
      Path: /opt/quarto/bin

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

[✓] Checking LaTeX....................OK
      Using: Installation From Path
      Path: /usr/bin
      Version: 2022

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

[✓] Checking Python 3 installation....OK
      Version: 3.11.2
      Path: /usr/bin/python3
      Jupyter: (None)

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

[✓] Checking R installation...........OK
      Version: 4.4.2
      Path: /usr/lib/R
      LibPaths:
        - /home/ca/Store/R
        - /usr/local/lib/R/site-library
        - /usr/lib/R/site-library
        - /usr/lib/R/library
      knitr: 1.48
      rmarkdown: 2.27

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

Activity

  1. added
    file-systemsissues with NFS, google drive, onedrive, etc
    previewissues related to the `preview` command
    on Nov 27, 2024
  2. cderv commented on Nov 28, 2024

    @cderv
    Member

    @allefeld does quarto preview outside of VSCODE still works or also same issue ?

    Just to confirm where this should be fixed exactly.

  3. allefeld commented on Nov 28, 2024

    @allefeld
    Author

    quarto preview outside of VS Code works, both without argument and with a filename.

  4. allefeld commented on Nov 7, 2025

    @allefeld
    Author

    Could this issue please be looked at? I'm still stumbling over it, and have even disabled automatic preview in the VS Code extension, using HTML preview provided by another extension, which however works badly with Reveal.

    Btw. it also happens if a space is not in the filename, but in a directory name.

    I'm not sure whether this is a problem in Quarto CLI or in the VS Code extension. Happy to open an issue in quarto-dev/quarto too, if that helps?

    Currently on Quarto 1.8.25 and VS Code extension 1.126.0.

  5. allefeld commented on Nov 7, 2025

    @allefeld
    Author

    Command run by the extension in the "Quarto Preview" terminal:

    quarto preview "/home/ … /Open Evening/Open_Evening_2025-11-05.md" --no-browser --no-watch-inputs
    

    Output in the "Quarto Preview" terminal:

    Image

    "Quarto Preview" tab:

    Image

    Clicking on the link in the "Quarto Preview" terminal successfully opens the file in a browser.

    Running quarto preview Open_Evening_2025-11-05.md in a terminal outside of VS Code does the same.

  6. cderv commented on Nov 10, 2025

    @cderv
    Member

    This is Quarto VSCODE extension issue, and it seems related to

    which was solved by

    But not release yet I think. So testing can be done using the VSIX built as part of CI run.

    For example,

    ❯ gh run download 19155797024 -R quarto-dev/quarto -n quarto-vscode-9838c73c205dc308bd755fa90fc34b9ed9362633 -D ./artifacts
    

    And then manually install the VSIX to try it.

  7. allefeld commented on Nov 12, 2025

    @allefeld
    Author

    Thanks, that worked!

    The other issue's description is correct in that the problem seems to only occur within multi-file projects.

    Strangely, after installation of the VSIX file Quarto didn't find the right environment anymore (or any Conda/Mamba etc. environments), which I had to fix by setting python.defaultInterpreterPath. Though I'm not sure that's directly related.

  8. mcanouil commented on Nov 12, 2025

    @mcanouil
    Collaborator

    Strangely, after installation of the VSIX file Quarto didn't find the right environment anymore (or any Conda/Mamba etc. environments), which I had to fix by setting python.defaultInterpreterPath. Though I'm not sure that's directly related

    This is more likely related to the monthly update of VSCode and Python extensions (second Thursday of the month).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingfile-systemsissues with NFS, google drive, onedrive, etcpreviewissues related to the `preview` command

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions