Skip to content

OSError: [Errno 30] Read-only file system: 'dbt_packages' #1792

@dfv-ms

Description

@dfv-ms

Expected behavior

I'm using vs-code on MacOS 15.7.3. I've set up a custom python environment /Users/username/source/python/dbt/dbt-env for dbt and registered the path in vs-code.

I expect to run this dbt instance from vs-code

Actual behavior

Since version 0.59.0 (and 0.59.1) I get an error OSError: [Errno 30] Read-only file system: 'dbt_packages'. For details see below.

Using version 0.58.13 everything is fine.

Steps To Reproduce

I open a model and press shift-cmd-enter. The dbt processing starts and runs into the above error.

Log output/Screenshots

10:40:11  Encountered an error:
[Errno 30] Read-only file system: 'dbt_packages'
10:40:11  Traceback (most recent call last):
  File "/Users/username/source/python/dbt/dbt-env/lib/python3.11/site-packages/dbt/cli/requires.py", line 90, in wrapper
    result, success = func(*args, **kwargs)
                      ^^^^^^^^^^^^^^^^^^^^^
  File "/Users/username/source/python/dbt/dbt-env/lib/python3.11/site-packages/dbt/cli/requires.py", line 75, in wrapper
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/Users/username/source/python/dbt/dbt-env/lib/python3.11/site-packages/dbt/cli/requires.py", line 168, in wrapper
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/Users/username/source/python/dbt/dbt-env/lib/python3.11/site-packages/dbt/cli/requires.py", line 197, in wrapper
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/Users/username/source/python/dbt/dbt-env/lib/python3.11/site-packages/dbt/cli/requires.py", line 244, in wrapper
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/Users/username/source/python/dbt/dbt-env/lib/python3.11/site-packages/dbt/cli/requires.py", line 284, in wrapper
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/Users/username/source/python/dbt/dbt-env/lib/python3.11/site-packages/dbt/cli/main.py", line 625, in run
    results = task.run()
              ^^^^^^^^^^
  File "/Users/username/source/python/dbt/dbt-env/lib/python3.11/site-packages/dbt/task/runnable.py", line 454, in run
    self._runtime_initialize()
  File "/Users/username/source/python/dbt/dbt-env/lib/python3.11/site-packages/dbt/task/compile.py", line 147, in _runtime_initialize
    super()._runtime_initialize()
  File "/Users/username/source/python/dbt/dbt-env/lib/python3.11/site-packages/dbt/task/runnable.py", line 143, in _runtime_initialize
    self.compile_manifest()
  File "/Users/username/source/python/dbt/dbt-env/lib/python3.11/site-packages/dbt/task/base.py", line 173, in compile_manifest
    self.graph = compiler.compile(self.manifest)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/username/source/python/dbt/dbt-env/lib/python3.11/site-packages/dbt/compilation.py", line 453, in compile
    self.initialize()
  File "/Users/username/source/python/dbt/dbt-env/lib/python3.11/site-packages/dbt/compilation.py", line 284, in initialize
    make_directory(self.config.packages_install_path)
  File "/usr/local/Cellar/python@3.11/3.11.14_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/functools.py", line 909, in wrapper
    return dispatch(args[0].__class__)(*args, **kw)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/username/source/python/dbt/dbt-env/lib/python3.11/site-packages/dbt/clients/system.py", line 128, in _
    raise e
  File "/Users/username/source/python/dbt/dbt-env/lib/python3.11/site-packages/dbt/clients/system.py", line 122, in _
    os.makedirs(path)
  File "<frozen os>", line 225, in makedirs
OSError: [Errno 30] Read-only file system: 'dbt_packages'

Operating System

MacOS 15.7.3

dbt version

1.7.4

dbt Adapter

bigquery: 1.7.2

dbt Power User version

0.59.1

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions