Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GCS 503 when collectstatic #1039

Open
adsee42 opened this issue Aug 10, 2021 · 0 comments
Open

GCS 503 when collectstatic #1039

adsee42 opened this issue Aug 10, 2021 · 0 comments

Comments

@adsee42
Copy link

adsee42 commented Aug 10, 2021

I'm having this error when executing collectstatic with cloud build:

Deleting 'flags/sh.gif'
Copying '/usr/local/lib/python3.8/site-packages/django_countries/static/flags/sh.gif'
Deleting 'flags/mv.gif'
Copying '/usr/local/lib/python3.8/site-packages/django_countries/static/flags/mv.gif'
Deleting 'flags/lu.gif'
Traceback (most recent call last):
  File "manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "/usr/local/lib/python3.8/site-packages/django/core/management/__init__.py", line 419, in execute_from_command_line
    utility.execute()
  File "/usr/local/lib/python3.8/site-packages/django/core/management/__init__.py", line 413, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/local/lib/python3.8/site-packages/django/core/management/base.py", line 354, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/usr/local/lib/python3.8/site-packages/django/core/management/base.py", line 398, in execute
    output = self.handle(*args, **options)
  File "/usr/local/lib/python3.8/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py", line 187, in handle
    collected = self.collect()
  File "/usr/local/lib/python3.8/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py", line 114, in collect
    handler(path, prefixed_path, storage)
  File "/usr/local/lib/python3.8/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py", line 338, in copy_file
    if not self.delete_file(path, prefixed_path, source_storage):
  File "/usr/local/lib/python3.8/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py", line 291, in delete_file
    self.storage.delete(prefixed_path)
  File "/usr/local/lib/python3.8/site-packages/storages/backends/gcloud.py", line 165, in delete
    self.bucket.delete_blob(name)
  File "/usr/local/lib/python3.8/site-packages/google/cloud/storage/bucket.py", line 1605, in delete_blob
    client._delete_resource(
  File "/usr/local/lib/python3.8/site-packages/google/cloud/storage/client.py", line 673, in _delete_resource
    return self._connection.api_request(
  File "/usr/local/lib/python3.8/site-packages/google/cloud/storage/_http.py", line 78, in api_request
    return call()
  File "/usr/local/lib/python3.8/site-packages/google/cloud/_http.py", line 484, in api_request
    raise exceptions.from_http_response(response)
google.api_core.exceptions.ServiceUnavailable: 503 DELETE https://storage.googleapis.com/storage/v1/b/statics/o/flags%2Flu.gif?prettyPrint=false: We encountered an internal error. Please try again.

I found #702 , and #698 seems to fixed that.
But I'm not sure my problem has anything to do with ACLs.

Django: 3.2
django-storage: 1.11

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant