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.

An error occurred (403) when calling the HeadObject operation: Forbidden Django==1.11

See original GitHub issue

Hi, i’m using boto3 with django 1.11. I save a image in amazon s3, then i try to open it with self.storage.open(image.name) and get the error described in the title. This works perfectly with django 1.10.7.

if original.closed: original = storage.open(original.name)

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
yamijuancommented, Apr 25, 2017

@andho the problem was that the name of the image didn’t exist in amazon s3. Django 1.11 does not save the new name in the image instance, so i obtained the new name directly from the field. that’s it.

0reactions
andhocommented, Apr 25, 2017

@yamijuan can you give me the detail on what the image naming issue was? I’m getting the same error. Maybe it can help me the specific filename that’s causing the issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Django/AWS - An error occurred (403) when calling the ...
Django /AWS - An error occurred (403) when calling the HeadObject operation: Forbidden ; "*" ], "AllowedMethods" ; "GET", "POST" ; "PUT" ],...
Read more >
An error occurred (403) when calling the HeadObject ... - GitHub
An error occurred (403) when calling the HeadObject operation: Forbidden Django==1.11 #296. Closed. yamijuan opened this issue on Apr 10, ...
Read more >
Django collect static S3 An error occurred (403) when calling ...
Coding example for the question Django collect static S3 An error occurred (403) when calling the HeadObject operation: Forbidden-django.
Read more >
Django AWS S3 403 (Forbidden) - Google Groups
I'm hosting my Static and Media Files of my Django Project on AWS s3. ... but some of the static files CSS &...
Read more >
Forbidden: An error occurred (403) when calling the ... - DVC
exceptions.ClientError: An error occurred (403) when calling the HeadObject operation: Forbidden The above exception was the direct cause of the ...
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