-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Description
ERROR:whyattend.webapp:Exception on /battles/list/PSQD/json [GET]
Traceback (most recent call last):
File "/home/cwtracker/cw.psqd.co/cw.psycho/local/lib/python2.7/site-packages/flask/app.py", line 1817, in wsgi_app
response = self.full_dispatch_request()
File "/home/cwtracker/cw.psqd.co/cw.psycho/local/lib/python2.7/site-packages/flask/app.py", line 1477, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/home/cwtracker/cw.psqd.co/cw.psycho/local/lib/python2.7/site-packages/flask/app.py", line 1381, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/home/cwtracker/cw.psqd.co/cw.psycho/local/lib/python2.7/site-packages/flask/app.py", line 1475, in full_dispatch_request
rv = self.dispatch_request()
File "/home/cwtracker/cw.psqd.co/cw.psycho/local/lib/python2.7/site-packages/flask/app.py", line 1461, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "/home/cwtracker/cw.psqd.co/whyattend/webapp.py", line 152, in decorated_function
return f(*args, **kwargs)
File "/home/cwtracker/cw.psqd.co/whyattend/webapp.py", line 960, in battles_list_json
battle_count = db_session.execute(select([func.count()]).select_from(battles.alias('battles'))).first()[0]
File "/home/cwtracker/cw.psqd.co/cw.psycho/local/lib/python2.7/site-packages/sqlalchemy/orm/scoping.py", line 157, in do
return getattr(self.registry(), name)(*args, **kwargs)
File "/home/cwtracker/cw.psqd.co/cw.psycho/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 1034, in execute
bind, close_with_result=True).execute(clause, params or {})
File "/home/cwtracker/cw.psqd.co/cw.psycho/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 914, in execute
return meth(self, multiparams, params)
File "/home/cwtracker/cw.psqd.co/cw.psycho/local/lib/python2.7/site-packages/sqlalchemy/sql/elements.py", line 323, in _execute_on_connection
return connection._execute_clauseelement(self, multiparams, params)
File "/home/cwtracker/cw.psqd.co/cw.psycho/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1010, in _execute_clauseelement
compiled_sql, distilled_params
File "/home/cwtracker/cw.psqd.co/cw.psycho/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1146, in _execute_context
context)
File "/home/cwtracker/cw.psqd.co/cw.psycho/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1341, in _handle_dbapi_exception
exc_info
File "/home/cwtracker/cw.psqd.co/cw.psycho/local/lib/python2.7/site-packages/sqlalchemy/util/compat.py", line 202, in raise_from_cause
reraise(type(exception), exception, tb=exc_tb, cause=cause)
File "/home/cwtracker/cw.psqd.co/cw.psycho/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1139, in _execute_context
context)
File "/home/cwtracker/cw.psqd.co/cw.psycho/local/lib/python2.7/site-packages/sqlalchemy/engine/default.py", line 450, in do_execute
cursor.execute(statement, parameters)
File "/home/cwtracker/cw.psqd.co/cw.psycho/local/lib/python2.7/site-packages/MySQLdb/cursors.py", line 205, in execute
self.errorhandler(self, exc, value)
File "/home/cwtracker/cw.psqd.co/cw.psycho/local/lib/python2.7/site-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler
raise errorclass, errorvalue
OperationalError: (_mysql_exceptions.OperationalError) (1055, "Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'psycho-tracker.battle.id' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by") [SQL: u'SELECT count(*) AS count_1 \nFROM (SELECT battle.id AS id, battle.date AS date, battle.clan AS clan, battle.enemy_clan AS enemy_clan, battle.victory AS victory, battle.draw AS draw, battle.paid AS paid, battle.description AS description, battle.duration AS duration, battle.score_own_team AS score_own_team, battle.score_enemy_team AS score_enemy_team, battle.map_name AS map_name, battle.map_province AS map_province, battle.battle_commander_id AS battle_commander_id, battle.creator_id AS creator_id, battle.replay_id AS replay_id, battle.stronghold AS stronghold, battle.battle_group_id AS battle_group_id, battle.battle_group_final AS battle_group_final, CASE WHEN (battle.victory = true) THEN %s WHEN (battle.draw = true) THEN %s ELSE %s END AS outcome, ifnull(battle.battle_group_id, rand()) AS unq_battle_group_id, anon_1.players AS players, anon_2.reserves AS reserves, player.name AS commander_name, player.role AS commander_role, CASE WHEN (battle.id IN (SELECT player_battle.battle_id \nFROM player_battle \nWHERE player_battle.reserve = false AND player_battle.player_id = %s)) THEN %s ELSE %s END AS was_player, CASE WHEN (battle.id IN (SELECT player_battle.battle_id \nFROM player_battle \nWHERE player_battle.reserve = true AND player_battle.player_id = %s)) THEN %s ELSE %s END AS was_reserve \nFROM battle LEFT OUTER JOIN (SELECT player_battle.battle_id AS battle_id, count(*) AS players \nFROM player_battle \nWHERE player_battle.reserve = false GROUP BY player_battle.battle_id) AS anon_1 ON anon_1.battle_id = battle.id LEFT OUTER JOIN (SELECT player_battle.battle_id AS battle_id, count(*) AS reserves \nFROM player_battle \nWHERE player_battle.reserve = true GROUP BY player_battle.battle_id) AS anon_2 ON anon_2.battle_id = battle.id LEFT OUTER JOIN player ON player.id = battle.battle_commander_id \nWHERE battle.clan = %s AND (battle.date = (SELECT max(battle_1.date) AS max_1 \nFROM battle AS battle_1 \nWHERE battle.battle_group_id = battle_1.battle_group_id) OR battle.battle_group_id IS NULL) GROUP BY unq_battle_group_id ORDER BY battle.date DESC) AS battles'] [parameters: ('Victory', 'Draw', 'Defeat', 111L, 1, 0, 111L, 1, 0, 'PSQD')]
ERROR:tornado.access:500 GET /battles/list/PSQD/json?sEcho=1&iColumns=14&sColumns=&iDisplayStart=0&iDisplayLength=10&mDataProp_0=0&mDataProp_1=1&mDataProp_2=2&mDataProp_3=3&mDataProp_4=4&mDataProp_5=5&mDataProp_6=6&mDataProp_7=7&mDataProp_8=8&mDataProp_9=9&mDataProp_10=10&mDataProp_11=11&mDataProp_12=12&mDataProp_13=13&sSearch=&bRegex=false&sSearch_0=&bRegex_0=false&bSearchable_0=true&sSearch_1=&bRegex_1=false&bSearchable_1=true&sSearch_2=&bRegex_2=false&bSearchable_2=true&sSearch_3=&bRegex_3=false&bSearchable_3=true&sSearch_4=&bRegex_4=false&bSearchable_4=true&sSearch_5=&bRegex_5=false&bSearchable_5=true&sSearch_6=&bRegex_6=false&bSearchable_6=true&sSearch_7=&bRegex_7=false&bSearchable_7=true&sSearch_8=&bRegex_8=false&bSearchable_8=true&sSearch_9=&bRegex_9=false&bSearchable_9=true&sSearch_10=&bRegex_10=false&bSearchable_10=true&sSearch_11=&bRegex_11=false&bSearchable_11=true&sSearch_12=&bRegex_12=false&bSearchable_12=true&sSearch_13=&bRegex_13=false&bSearchable_13=true&iSortCol_0=1&sSortDir_0=desc&iSortingCols=1&bSortable_0=true&bSortable_1=true&bSortable_2=true&bSortable_3=true&bSortable_4=true&bSortable_5=true&bSortable_6=true&bSortable_7=false&bSortable_8=true&bSortable_9=true&bSortable_10=true&bSortable_11=false&bSortable_12=false&bSortable_13=false&_=1465914277876 (127.0.0.1) 9.64ms
I'm a little bit afraid to push the updates further; I see that it's a problem with MySQL connection, updated alembic.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels