Opened 15 years ago

Closed 15 years ago

Last modified 12 years ago

#11103 closed (fixed)

AttributeError: 'ImageFieldFile' object has no attribute 'name'

Reported by: anonymous Owned by: nobody
Component: Database layer (models, ORM) Version: dev
Severity: Keywords: ImageFieldFile
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description (last modified by Alex Gaynor)

Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/django/core/servers/basehttp.py", line 278, in run
    self.result = application(self.environ, self.start_response)
  File "/usr/lib/python2.6/dist-packages/django/core/servers/basehttp.py", line 636, in __call__
    return self.application(environ, start_response)
  File "/usr/lib/python2.6/dist-packages/django/core/handlers/wsgi.py", line 245, in __call__
    response = middleware_method(request, response)
  File "/usr/lib/python2.6/dist-packages/django/contrib/sessions/middleware.py", line 36, in process_response
    request.session.save()
  File "/usr/lib/python2.6/dist-packages/django/contrib/sessions/backends/db.py", line 53, in save
    session_data = self.encode(self._get_session(no_load=must_create)),
  File "/usr/lib/python2.6/dist-packages/django/contrib/sessions/backends/base.py", line 88, in encode
    pickled = pickle.dumps(session_dict, pickle.HIGHEST_PROTOCOL)
  File "/usr/lib/python2.6/dist-packages/django/db/models/fields/files.py", line 139, in __getstate__
    return {'name': self.name, 'closed': False, '_committed': True, '_file': None}

Change History (8)

comment:1 by anonymous, 15 years ago

Component: File uploads/storageDatabase layer (models, ORM)

comment:2 by Alex Gaynor, 15 years ago

Description: modified (diff)

Fixed formatting.

comment:3 by anonymous, 15 years ago

milestone: 1.2

comment:4 by Gary Wilson, 15 years ago

(In [10860]) Added test for pickling of a model with an ImageField, refs #11103.

comment:5 by Gary Wilson, 15 years ago

Resolution: fixed
Status: newclosed

Is this still an issue for you? I could not reproduce the error, and added a test in [10860] that passes here.

comment:6 by Gary Wilson, 15 years ago

milestone: 1.21.1

comment:7 by ccahoon, 15 years ago

(In [10989]) Added test for pickling of a model with an ImageField, refs #11103.

comment:8 by Jacob, 12 years ago

milestone: 1.1

Milestone 1.1 deleted

Note: See TracTickets for help on using tickets.
Back to Top