You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I had following error message when either looked uploaded battle or edited it:
2015-09-13 21:28:14,518 ERROR: Exception on /battles/6698 [GET]
Traceback (most recent call last):
File "/var/www/clanwars/myenv/lib/python2.7/site-packages/flask/app.py", line 1817, in wsgi_app
response = self.full_dispatch_request()
File "/var/www/clanwars/myenv/lib/python2.7/site-packages/flask/app.py", line 1477, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/var/www/clanwars/myenv/lib/python2.7/site-packages/flask/app.py", line 1381, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/var/www/clanwars/myenv/lib/python2.7/site-packages/flask/app.py", line 1475, in full_dispatch_request
rv = self.dispatch_request()
File "/var/www/clanwars/myenv/lib/python2.7/site-packages/flask/app.py", line 1461, in dispatch_request
return self.view_functionsrule.endpoint
File "/var/www/clanwars/whyattend/webapp.py", line 152, in decorated_function
return f(_args, *_kwargs)
File "/var/www/clanwars/whyattend/webapp.py", line 1048, in battle_details
return render_template('battles/battle.html', battle=battle, replays=replays)
File "/var/www/clanwars/myenv/lib/python2.7/site-packages/flask/templating.py", line 128, in render_template
context, ctx.app)
File "/var/www/clanwars/myenv/lib/python2.7/site-packages/flask/templating.py", line 110, in _render
rv = template.render(context)
File "/var/www/clanwars/myenv/lib/python2.7/site-packages/jinja2/environment.py", line 969, in render
return self.environment.handle_exception(exc_info, True)
File "/var/www/clanwars/myenv/lib/python2.7/site-packages/jinja2/environment.py", line 742, in handle_exception
reraise(exc_type, exc_value, tb)
File "/var/www/clanwars/whyattend/templates/battles/battle.html", line 1, in top-level template code
{% extends "layout.html" %}
File "/var/www/clanwars/whyattend/templates/layout.html", line 163, in top-level template code
{% block content %}{% endblock %}
File "/var/www/clanwars/whyattend/templates/battles/battle.html", line 128, in block "content"
{% if battle.replay.unpickle() %}
File "/var/www/clanwars/whyattend/model.py", line 266, in unpickle
try:
File "/usr/lib/python2.7/pickle.py", line 1382, in loads
return Unpickler(file).load()
File "/usr/lib/python2.7/pickle.py", line 858, in load
dispatchkey
File "/usr/lib/python2.7/pickle.py", line 880, in load_eof
raise EOFError
EOFError
I changed original code from model.py (around line 265-266):
def unpickle(self):
return pickle.loads(self.replay_pickle)
to following code (which probably is probably my old version crash fixes):
def unpickle(self):
try:
return pickle.loads(self.replay_pickle)
except EOFError:
return None
except ValueError:
return None
else:
return None
Which doesnt give any errors anymore but then you wont get any information from replays.
Are this part broken or is just my version?
The text was updated successfully, but these errors were encountered:
I had following error message when either looked uploaded battle or edited it:
2015-09-13 21:28:14,518 ERROR: Exception on /battles/6698 [GET]
Traceback (most recent call last):
File "/var/www/clanwars/myenv/lib/python2.7/site-packages/flask/app.py", line 1817, in wsgi_app
response = self.full_dispatch_request()
File "/var/www/clanwars/myenv/lib/python2.7/site-packages/flask/app.py", line 1477, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/var/www/clanwars/myenv/lib/python2.7/site-packages/flask/app.py", line 1381, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/var/www/clanwars/myenv/lib/python2.7/site-packages/flask/app.py", line 1475, in full_dispatch_request
rv = self.dispatch_request()
File "/var/www/clanwars/myenv/lib/python2.7/site-packages/flask/app.py", line 1461, in dispatch_request
return self.view_functionsrule.endpoint
File "/var/www/clanwars/whyattend/webapp.py", line 152, in decorated_function
return f(_args, *_kwargs)
File "/var/www/clanwars/whyattend/webapp.py", line 1048, in battle_details
return render_template('battles/battle.html', battle=battle, replays=replays)
File "/var/www/clanwars/myenv/lib/python2.7/site-packages/flask/templating.py", line 128, in render_template
context, ctx.app)
File "/var/www/clanwars/myenv/lib/python2.7/site-packages/flask/templating.py", line 110, in _render
rv = template.render(context)
File "/var/www/clanwars/myenv/lib/python2.7/site-packages/jinja2/environment.py", line 969, in render
return self.environment.handle_exception(exc_info, True)
File "/var/www/clanwars/myenv/lib/python2.7/site-packages/jinja2/environment.py", line 742, in handle_exception
reraise(exc_type, exc_value, tb)
File "/var/www/clanwars/whyattend/templates/battles/battle.html", line 1, in top-level template code
{% extends "layout.html" %}
File "/var/www/clanwars/whyattend/templates/layout.html", line 163, in top-level template code
{% block content %}{% endblock %}
File "/var/www/clanwars/whyattend/templates/battles/battle.html", line 128, in block "content"
{% if battle.replay.unpickle() %}
File "/var/www/clanwars/whyattend/model.py", line 266, in unpickle
try:
File "/usr/lib/python2.7/pickle.py", line 1382, in loads
return Unpickler(file).load()
File "/usr/lib/python2.7/pickle.py", line 858, in load
dispatchkey
File "/usr/lib/python2.7/pickle.py", line 880, in load_eof
raise EOFError
EOFError
I changed original code from model.py (around line 265-266):
def unpickle(self):
return pickle.loads(self.replay_pickle)
to following code (which probably is probably my old version crash fixes):
def unpickle(self):
try:
return pickle.loads(self.replay_pickle)
except EOFError:
return None
except ValueError:
return None
else:
return None
Which doesnt give any errors anymore but then you wont get any information from replays.
Are this part broken or is just my version?
The text was updated successfully, but these errors were encountered: