sopython/sopython-site

Transcript caching error

davidism opened this issue · 0 comments

Cache messages from 21596212 to 21599173, get the following error in the logs. Issue with how stars are detected.

[2015-02-17 16:52:31,121] ERROR in app: Exception on /transcript/3/update [POST]
Traceback (most recent call last):
  File "/home/sopython/lib/python3.4/site-packages/flask/app.py", line 1864, in wsgi_app
    response = self.full_dispatch_request()
  File "/home/sopython/lib/python3.4/site-packages/flask/app.py", line 1519, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/home/sopython/lib/python3.4/site-packages/flask/app.py", line 1423, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/home/sopython/lib/python3.4/site-packages/flask/_compat.py", line 33, in reraise
    raise value
  File "/home/sopython/lib/python3.4/site-packages/flask/app.py", line 1517, in full_dispatch_request
    rv = self.dispatch_request()
  File "/home/sopython/lib/python3.4/site-packages/flask/app.py", line 1503, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/home/sopython/lib/python3.4/site-packages/sopy/auth/login.py", line 170, in check_auth
    return func(*args, **kwargs)
  File "/home/sopython/lib/python3.4/site-packages/sopy/transcript/views.py", line 31, in update
    if form.validate_on_submit():
  File "/home/sopython/lib/python3.4/site-packages/flask_wtf/form.py", line 166, in validate_on_submit
    return self.is_submitted() and self.validate()
  File "/home/sopython/lib/python3.4/site-packages/sopy/transcript/forms.py", line 37, in validate
    self.messages = list(get_range(start, end))
  File "/home/sopython/lib/python3.4/site-packages/sopy/transcript/parser.py", line 125, in get_range
    out = ChatMessage.html_load(element, room_id, ts_date, update=False)
  File "/home/sopython/lib/python3.4/site-packages/sopy/se_data/models/chat.py", line 113, in html_load
    o.stars = int(stars_elem.find('span', class_='times').string) if stars_elem is not None else 0
TypeError: int() argument must be a string or a number, not 'NoneType'