Code

Opened 6 years ago

Closed 6 years ago

Last modified 3 years ago

#8364 closed (duplicate)

exception about sessions when use cache backends

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

Description

############
# SESSIONS #
############

# Whether to save the session data on every request.

SESSION_EXPIRE_AT_BROWSER_CLOSE = True
SESSION_ENGINE = 'django.contrib.sessions.backends.cache'

Traceback (most recent call last):

File "D:\allworkspace\myworkspace\Dhousemap\django\core\servers\basehttp.py", line 277, in run

self.result = application(self.environ, self.start_response)

File "D:\allworkspace\myworkspace\Dhousemap\django\core\servers\basehttp.py", line 634, in call

return self.application(environ, start_response)

File "D:\allworkspace\myworkspace\Dhousemap\django\core\handlers\wsgi.py", line 220, in call

response = middleware_method(request, response)

File "D:\allworkspace\myworkspace\Dhousemap\django\contrib\sessions\middleware.py", line 25, in process_response

if request.session.get_expire_at_browser_close():

File "D:\allworkspace\myworkspace\Dhousemap\django\contrib\sessions\backends\base.py", line 225, in get_expire_at_browser_close

if self.get('_session_expiry') is None:

File "D:\allworkspace\myworkspace\Dhousemap\django\contrib\sessions\backends\base.py", line 63, in get

return self._session.get(key, default)

AttributeError: 'NoneType' object has no attribute 'get'

Attachments (0)

Change History (3)

comment:1 Changed 6 years ago by jimichan

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

i found it be happen when i modify source file

i run server use "manage.py runserver"

comment:2 Changed 6 years ago by mtredinnick

  • Resolution set to duplicate
  • Status changed from new to closed

In future, please provide the steps we need to take to repeat the problem. The traceback alone is very rarely enough to understand what's going on.

In this case, I'm going to guess this is a duplicate of #8351, which I'll be fixing later today.

comment:3 Changed 3 years ago by jacob

  • milestone 1.0 deleted

Milestone 1.0 deleted

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.