OSError: [Errno 30] Read-only file system: '/[Path to project]' on mac

4.9k Views Asked by At

I am trying to set up django-silk in my django project and I keep running into this issue when I run python manage.py collectstatic. I have tried creating a new virtual environment and trying again but I get the same error. But if I were to create a new django project with only Dango Rest Framework and Silk everything works fine. I have been stuck on this issue for several days. Can anyone help?

My environment: MacOS Catalina 10.15.4 python 3.7.3 Django 2.2.10 djangorestframework 3.9.1 django-silk 3.0.4 Project location: /Users/cstephenson/Desktop/repos/MyProject

Full stack trace:

  File "manage.py", line 15, in <module>
    execute_from_command_line(sys.argv)
  File "/Users/cstephenson/Desktop/myenv/lib/python3.7/site-packages/django/core/management/__init__.py", line 381, in execute_from_command_line
    utility.execute()
  File "/Users/cstephenson/Desktop/myenv/lib/python3.7/site-packages/django/core/management/__init__.py", line 375, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/Users/cstephenson/Desktop/myenv/lib/python3.7/site-packages/django/core/management/base.py", line 323, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/Users/cstephenson/Desktop/myenv/lib/python3.7/site-packages/django/core/management/base.py", line 364, in execute
    output = self.handle(*args, **options)
  File "/Users/cstephenson/Desktop/myenv/lib/python3.7/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py", line 188, in handle
    collected = self.collect()
  File "/Users/cstephenson/Desktop/myenv/lib/python3.7/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py", line 114, in collect
    handler(path, prefixed_path, storage)
  File "/Users/cstephenson/Desktop/myenv/lib/python3.7/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py", line 352, in copy_file
    self.storage.save(prefixed_path, source_file)
  File "/Users/cstephenson/Desktop/myenv/lib/python3.7/site-packages/django/core/files/storage.py", line 52, in save
    return self._save(name, content)
  File "/Users/cstephenson/Desktop/myenv/lib/python3.7/site-packages/django/core/files/storage.py", line 242, in _save
    os.makedirs(directory)
  File "/Users/cstephenson/Desktop/myenv/bin/../lib/python3.7/os.py", line 211, in makedirs
    makedirs(head, exist_ok=exist_ok)
  File "/Users/cstephenson/Desktop/myenv/bin/../lib/python3.7/os.py", line 211, in makedirs
    makedirs(head, exist_ok=exist_ok)
  File "/Users/cstephenson/Desktop/myenv/bin/../lib/python3.7/os.py", line 211, in makedirs
    makedirs(head, exist_ok=exist_ok)
  [Previous line repeated 1 more time]
  File "/Users/cstephenson/Desktop/myenv/bin/../lib/python3.7/os.py", line 221, in makedirs
    mkdir(name, mode)
OSError: [Errno 30] Read-only file system: '/[Path to project]'
0

There are 0 best solutions below