Opened 9 years ago
Last modified 8 years ago
#25862 closed Bug
AttributeError: 'FileSystemStorage' object has no attribute 'location' — at Initial Version
Reported by: | Johannes Maron | Owned by: | nobody |
---|---|---|---|
Component: | Core (Other) | Version: | dev |
Severity: | Normal | Keywords: | py2 |
Cc: | info@… | Triage Stage: | Accepted |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
I don't really want to bug anyone with python 2.7, for I couldn't care less. But, I stumbled upon something rather odd.
Easiest is to just check out the error on travis including the stack trace:
https://travis-ci.org/codingjoe/django-stdimage/builds/94713726
Everything works fine in Python 3, the attribute is available, as it should. It it's an instance attribute and properly set in the __init__
method:
https://github.com/django/django/blob/master/django/core/files/storage.py#L169-L172
I guess the error is here:
https://github.com/django/django/blob/master/django/utils/_os.py#L24-L32
I'm not sure tho, because the method must return at least None
, therefore I don't see how the attribute error is being raised.