Opened 7 years ago

Closed 7 years ago

#9936 closed (duplicate)

file backed sessions not working because file rename fails

Reported by: lrhazi Owned by: nobody
Component: contrib.sessions Version: master
Severity: Keywords: sessions file
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:


Using latest svn jython-dev, django-dev and django-jython, on Windows XP Pro x64:

Jython 2.5b0+ (trunk, Dec 30 2008, 21:59:18)
[Java HotSpot(TM) 64-Bit Server VM (Sun Microsystems Inc.)] on java1.6.0_11

no data is ever saved to the session files, their size always remains zero bytes.

in file django-dev\django\contrib\sessions\backends\

around line 140, made this change:
#except (OSError, IOError, EOFError):

except Exception,e:

logging.debug(" exception %s"%repr(e))

to discover this error: exception OSError(0, "couldn't rename file")

The two file names involved:
H:\My Dev\ipool\ipool\session_dir\iPoolSessionID749b497bbcd689e20e16a0e634966504_out_8wuuxd
H:\My Dev\ipool\ipool\session_dir\iPoolSessionID749b497bbcd689e20e16a0e634966504

renaming them directly from jython shell, using os.rename() works fine.

replaced os.rename with shutil.copy and sessions seem to work as expected.

Thanks a lot.

Change History (1)

comment:1 Changed 7 years ago by kmtracey

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to duplicate
  • Status changed from new to closed

#9084 already covers this, I believe.

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