question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Problems with staticfiles.json while using ManifestStaticS3Storage

See original GitHub issue

Hello @etianen

I’m having trouble setting up static files using django_s3_storage.storage.ManifestStaticS3Storage. While accessing static files via static tag or using collectstatic, I’m getting Exception:

OSError: S3Storage error at u’staticfiles.json’: An error occurred (NoSuchKey) when calling the GetObject operation: The specified key does not exist.

Everything works while using django_s3_storage.storage.StaticS3Storage.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
etianencommented, Jun 26, 2017

Ahahahahahaahahaha!!!

WHY NOT BOTH!???!?!?!!! 😄 😄

https://github.com/etianen/django-s3-storage/blob/master/django_s3_storage/storage.py#L28

That’s the silliest bit of code I’m going to write all week. 😛

Let me know if it works for you.

On 26 June 2017 at 09:56, Matthias Kestenholz notifications@github.com wrote:

I’d assume that some places expect an IOError (such as reading the manifest), and other places expect an OSError (such as when determining the last modification date)

I think there’s no way around either reimplementing parts of Django’s storage classes in django-s3-storage (short of patching Django itself…)

On Mon, Jun 26, 2017 at 10:52 AM, Dave Hall notifications@github.com wrote:

Oh, crap. Looking at the Django source code, it appears that Django does expect an IOError.

Any yet, in issue #42, the IOError was changed to an OSError for the same reason!

What’s going on?

I’ve pushed a change to master that switches to using IOError. Can you see if it fixes your issue?

On 26 June 2017 at 08:55, Matthias Kestenholz notifications@github.com wrote:

Hmm. Related: #42 <https://github.com/etianen/ django-s3-storage/issues/42>

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <https://github.com/etianen/django-s3-storage/issues/56# issuecomment-310988674>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AAJFCFgwdZD- vSWGwMb59JPFrXiRhgXPks5sH2PtgaJpZM4ODoMl> .

— You are receiving this because you commented. Reply to this email directly, view it on GitHub <https://github.com/etianen/django-s3-storage/issues/56# issuecomment-311000845>, or mute the thread <https://github.com/notifications/unsubscribe-auth/ AAAKQ2ctMquDpmVUH59GEM5exd7Dw4t5ks5sH3FmgaJpZM4ODoMl> .

– www.feinheit.ch — beratung@feinheit.ch — +41 555 11 11 41

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/etianen/django-s3-storage/issues/56#issuecomment-311001801, or mute the thread https://github.com/notifications/unsubscribe-auth/AAJFCKWQJMmk_A_-J_XZtVLGK0NMZ4Phks5sH3JagaJpZM4ODoMl .

0reactions
etianencommented, Jun 27, 2017

Oh, oops, NOW it’s fixed in master.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Store static files on S3 but staticfiles.json manifest locally
I can see two problems with that: My app's storage instance would have to fetch staticfiles.
Read more >
An empty staticfiles.json causes Internal server error - FramaGit
It appear that the file /var/ideascube/static/staticfiles.json somehow get empty. When the device start, the ideascube software runs migration ...
Read more >
staticfiles.json keeps deleted entries when collectstatic is run
There are at least a few problems caused by the current setup: 1) It can lead to hard-to-find asset bugs. If you rename...
Read more >
Store static files on S3 but staticfiles.json manifest locally
Django : Store static files on S3 but staticfiles. json manifest locally [ Beautify Your Computer : https://www.hows.tech/p/recommended.html ] ...
Read more >
The staticfiles app — Django 4.1.4 documentation
For guidelines on deploying static files, see How to deploy static ... names for all processed files in a file called staticfiles.json ....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found