Modify ↓
Opened 15 years ago
Closed 15 years ago
#8739 closed defect (fixed)
TypeError during login when session.last_visit column is null
Reported by: | anonymous | Owned by: | Remy Blank |
---|---|---|---|
Priority: | normal | Milestone: | 0.11.6 |
Component: | general | Version: | 0.11.5 |
Severity: | minor | Keywords: | |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
This happens in 0.11.4 and 0.11.5. It occured after I inserted rows directly to session and session_attribute tables (email) for my new users. I left last_visit column blank. When I put some value into it the error disappeared!
I think Trac shuoldn't throw an error in such situation.
I have found the reason of the error during reporting this ticket :-) I leave it for others.
2009-10-14 12:38:01,171 Trac[9466:mytrac:main]: ERROR: Internal Server Error: Traceback (most recent call last): File "/usr/lib/python2.5/site-packages/trac/web/main.py", line 444, in _dispatch_request dispatcher.dispatch(req) File "/usr/lib/python2.5/site-packages/trac/web/main.py", line 226, in dispatch data, content_type) File "/usr/lib/python2.5/site-packages/trac/web/chrome.py", line 726, in render_template req.session.pop('chrome.%s.%d' % (type_, i))) File "/usr/lib/python2.5/site-packages/trac/web/api.py", line 195, in __getattr__ value = self.callbacks[name](self) File "/usr/lib/python2.5/site-packages/trac/web/main.py", line 264, in _get_session return Session(self.env, req) File "/usr/lib/python2.5/site-packages/trac/web/session.py", line 157, in __init__ self.get_session(req.authname, authenticated=True) File "/usr/lib/python2.5/site-packages/trac/web/session.py", line 173, in get_session super(Session, self).get_session(sid, authenticated) File "/usr/lib/python2.5/site-packages/trac/web/session.py", line 61, in get_session self.last_visit = int(row[0]) TypeError: int() argument must be a string or a number, not 'NoneType'
Attachments (0)
Change History (2)
comment:1 by , 15 years ago
Milestone: | → 0.11.6 |
---|---|
Owner: | set to |
Severity: | critical → minor |
Note:
See TracTickets
for help on using tickets.
Even though you are not supposed to write directly to the database, we could indeed make the session code a bit more robust. Probably a one-line fix.