Skip to content

Including data files #33

@jayqi

Description

@jayqi

When including data files, I tried to follow the "Including data" instructions from the WebAssembly Notebooks documentation.

  • I created a directory public/ alongside my index.qmd source file. It contains my data file data.csv.
  • I specified the path relative to mo.notebook_location().
    data_path = mo.notebook_location() / "public" / "data.csv"

This works fine in the marimo editor.

However, when I try to render the notebook, I initially get the error:

[Errno 2] No such file or directory: '/Users/jay/Desktop/quarto-marimo-data-file-repro/_extensions/marimo-team/marimo/public/data.csv'

which then turns into:

[Errno 44] No such file or directory: 'blob:http://localhost:3433/0ded1be0-28ad-4020-8d92-0f854ef823a0/public/data.csv'

(/Users/jay/Desktop/quarto-marimo-data-file-repro/ is the root directory of my project.)

What's the correct way to include data files? It looks like at least that the extension is not using the correct path for mo.notebook_location() — it's using the extension directory rather than the notebook's location.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions