Skip to content

Permission denied looking for pyproject.toml #6715

@aszekMosek

Description

@aszekMosek

Describe the bug

I have marimo==0.16.5 (but the problem appears also in earlier versions) on osxaarch64.

Any attempt to run any notebook causes:

marimotest aszek$ python3 notebook.py 
Traceback (most recent call last):
  File "/System/Volumes/Data/home/aszek/tmp/marimotest/notebook.py", line 12, in <module>
    app.run()
  File "/home/aszek/Library/Python/3.10/lib/python/site-packages/marimo/_ast/app.py", line 728, in run
    ).run()
  File "/home/aszek/Library/Python/3.10/lib/python/site-packages/marimo/_runtime/app/script_runner.py", line 207, in run
    initialize_script_context(
  File "/home/aszek/Library/Python/3.10/lib/python/site-packages/marimo/_runtime/context/script_context.py", line 157, in initialize_script_context
    cache_store=get_store(filename),
  File "/home/aszek/Library/Python/3.10/lib/python/site-packages/marimo/_save/stores/__init__.py", line 35, in get_store
    get_default_config_manager(current_path=current_path)
  File "/home/aszek/Library/Python/3.10/lib/python/site-packages/marimo/_config/manager.py", line 63, in get_default_config_manager
    ProjectConfigManager(current_path),
  File "/home/aszek/Library/Python/3.10/lib/python/site-packages/marimo/_config/manager.py", line 185, in __init__
    self.pyproject_path = find_nearest_pyproject_toml(start_path)
  File "/home/aszek/Library/Python/3.10/lib/python/site-packages/marimo/_config/reader.py", line 55, in find_nearest_pyproject_toml
    while not path.joinpath("pyproject.toml").exists():
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/pathlib.py", line 1288, in exists
    self.stat()
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/pathlib.py", line 1095, in stat
    return self._accessor.stat(self, follow_symlinks=follow_symlinks)
PermissionError: [Errno 13] Permission denied: '/System/Volumes/Data/home/pyproject.toml'

As far as I understand it tries to recursively look for pyproject.toml moving up the directory tree, however it eventually hits a folder sufficiently high up to generate a permission error.

Putting an empty pyproject.toml in the same folder as the *.py file is of course a workaround. But it would be nice if marimo worked just to run the *.py file; I don't want or need any additional configuration nor should I have to create a fake one.

Will you submit a PR?

  • Yes

Environment

Replace this line with the output of marimo env. Leave the backticks in place.

Code to reproduce

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions