127.0.0.1 - - [04/Apr/2021 16:17:52] "GET //user/info HTTP/1.0" 500 22798 0.005185
Traceback (most recent call last):
File "/home/lars/po-4-op-een-rij/venv/lib/python3.8/site-packages/flask/app.py", line 2450, in wsgi_app
response = self.handle_exception(e)
File "/home/lars/po-4-op-een-rij/venv/lib/python3.8/site-packages/flask/app.py", line 1867, in handle_exception
reraise(exc_type, exc_value, tb)
File "/home/lars/po-4-op-een-rij/venv/lib/python3.8/site-packages/flask/_compat.py", line 39, in reraise
raise value
File "/home/lars/po-4-op-een-rij/venv/lib/python3.8/site-packages/flask/app.py", line 2447, in wsgi_app
response = self.full_dispatch_request()
File "/home/lars/po-4-op-een-rij/venv/lib/python3.8/site-packages/flask/app.py", line 1952, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/home/lars/po-4-op-een-rij/venv/lib/python3.8/site-packages/flask/app.py", line 1821, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/home/lars/po-4-op-een-rij/venv/lib/python3.8/site-packages/flask/_compat.py", line 39, in reraise
raise value
File "/home/lars/po-4-op-een-rij/venv/lib/python3.8/site-packages/flask/app.py", line 1950, in full_dispatch_request
rv = self.dispatch_request()
File "/home/lars/po-4-op-een-rij/venv/lib/python3.8/site-packages/flask/app.py", line 1936, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "/home/lars/po-4-op-een-rij/api/user/games.py", line 72, in index
{"games": fetch_games(user_id, 20)})
File "/home/lars/po-4-op-een-rij/api/user/games.py", line 46, in fetch_games
export.append(format_game(game_id[0], user_id))
File "/home/lars/po-4-op-een-rij/api/game/info.py", line 38, in format_game
"opponent": None if not opponent else format_user(opponent),
File "/home/lars/po-4-op-een-rij/api/user/info.py", line 45, in format_user
"rating": get_rating(user_id), #TODO: calculate rating based on game analysis
File "/home/lars/po-4-op-een-rij/api/rating.py", line 26, in get_rating
counted_opponents |= {game[1]: (counted_opponents.get(game[1]) or 0) + { "w": 1, "l": -1, "d": 0 }[game[2]]}
TypeError: unsupported operand type(s) for |=: 'dict' and 'dict'