Othernet-Project / librarian-core

GNU General Public License v3.0
1 stars 0 forks source link

timestamp out of range error during setup #8

Closed foxbunny closed 8 years ago

foxbunny commented 8 years ago

Lighthouse with unreleased firmware.

Traceback (most recent call last):
  File "/usr/bin/bottle.py", line 862, in _handle
    return route.call(**args) 
  File "/usr/lib/python2.7/site-packages/librarian_core/contrib/databases/plugins.py", line 11, in wrapper
    return callback(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/librarian_core/contrib/sessions/plugins.py", line 34, in wrapper
    request.session = Session.fetch(session_id)
  File "/usr/lib/python2.7/site-packages/librarian_core/contrib/sessions/sessions.py", line 219, in fetch
    db.query(q, session_id)   
  File "/usr/lib/python2.7/site-packages/librarian_core/contrib/databases/squery.py", line 149, in query
    self.cursor.execute(qry, params or kwparams)
  File "/usr/lib/python2.7/site-packages/librarian_core/contrib/databases/squery.py", line 33, in from_utc_timestamp
    dt = datetime.datetime.utcfromtimestamp(float(timestamp))
ValueError: timestamp out of range for platform time_t

Note that right after boot, time on the platform is screwed up. Probably a check for valid bounds must be placed somewhere.

foxbunny commented 8 years ago

Also, not sure if this is related, but after accessing the setup page once, and then reloading the page, the following Mako traceback is shown:


/usr/bin/bottle.py, line 1394:
raise AttributeError('Attribute %r not defined.' % name)
/usr/lib/python2.7/site-packages/librarian_ui/views/base.tpl, line 44:
<html lang="${request.locale}"${' dir="rtl"' if th.is_rtl(request.locale) == True else ''}>
/usr/lib/python2.7/site-packages/mako/runtime.py, line 853:
callable_(context, *args, **kwargs)
foxbunny commented 8 years ago

I seem to recall this was fixed? Please close if so.

n0phx commented 8 years ago

Indeed, fixed in b425159fdd719eddb3fa6cc4f22fe18ae313adcc