{"action":"opened","issue":{"url":"https://api.github.com/repos/PennyDreadfulMTG/perf-reports/issues/37739","repository_url":"https://api.github.com/repos/PennyDreadfulMTG/perf-reports","labels_url":"https://api.github.com/repos/PennyDreadfulMTG/perf-reports/issues/37739/labels{/name}","comments_url":"https://api.github.com/repos/PennyDreadfulMTG/perf-reports/issues/37739/comments","events_url":"https://api.github.com/repos/PennyDreadfulMTG/perf-reports/issues/37739/events","html_url":"https://github.com/PennyDreadfulMTG/perf-reports/issues/37739","id":360467894,"node_id":"MDU6SXNzdWUzNjA0Njc4OTQ=","number":37739,"title":"500 error at /seasons/8/people/pseudodude/","user":{"login":"vorpal-buildbot","id":23072004,"node_id":"MDQ6VXNlcjIzMDcyMDA0","avatar_url":"https://avatars2.githubusercontent.com/u/23072004?v=4","gravatar_id":"","url":"https://api.github.com/users/vorpal-buildbot","html_url":"https://github.com/vorpal-buildbot","followers_url":"https://api.github.com/users/vorpal-buildbot/followers","following_url":"https://api.github.com/users/vorpal-buildbot/following{/other_user}","gists_url":"https://api.github.com/users/vorpal-buildbot/gists{/gist_id}","starred_url":"https://api.github.com/users/vorpal-buildbot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vorpal-buildbot/subscriptions","organizations_url":"https://api.github.com/users/vorpal-buildbot/orgs","repos_url":"https://api.github.com/users/vorpal-buildbot/repos","events_url":"https://api.github.com/users/vorpal-buildbot/events{/privacy}","received_events_url":"https://api.github.com/users/vorpal-buildbot/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-09-14T22:00:37Z","updated_at":"2018-09-14T22:00:37Z","closed_at":null,"author_association":"NONE","body":" Failed to execute `\n        SELECT\n            d.id,\n            ROUND(SUM(CASE WHEN dm.games > odm.games THEN 1 ELSE 0 END) / NULLIF((SUM(CASE WHEN dm.games <> odm.games THEN 1 ELSE 0 END)), 0), 2) * 100 AS omw\n        FROM\n            deck AS d\n        INNER JOIN\n            deck_match AS my_dm ON my_dm.deck_id = d.id\n        LEFT JOIN\n            deck_match AS my_odm ON my_odm.match_id = my_dm.match_id AND my_odm.deck_id <> d.id\n        INNER JOIN\n            deck AS od ON od.id = my_odm.deck_id\n        INNER JOIN\n            deck_match AS dm ON dm.deck_id = od.id\n        LEFT JOIN\n            deck_match AS odm ON odm.match_id = dm.match_id AND odm.deck_id <> dm.deck_id\n        INNER JOIN\n            `match` AS m ON m.id = dm.match_id\n        WHERE\n            d.id IN ()\n        GROUP BY\n            d.id\n    ` with `[]` because of `(1064, \"You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ')\\n        GROUP BY\\n            d.id' at line 19\")`\n\nReported on decksite by logged_out```\n            --------------------------------------------------------------------------------\n            Request Method: GET\n            Path: /seasons/8/people/pseudodude/?locale=pt_BR\n            Cookies: {'__cfduid': 'df285ae8bdea79f7600a2c4d1f6e3ca8d1536962385', 'session': 'eyJsb2NhbGUiOiJwbCJ9.Dn3A_Q.uJU-4Nx5S8sZvmJxWO-0k5ymMn8'}\n            Endpoint: seasons.person\n            View Args: {'person_id': 'pseudodude'}\n            Person: logged_out\n            Referrer: None\n            Request Data: {}\nHost: pennydreadfulmagic.com\nAccept-Encoding: gzip\nCf-Ipcountry: DE\nX-Forwarded-For: 2a01:4f8:10b:d9f:0:0:0:2, 162.158.89.171\nCf-Ray: 45a620929bb296dc-FRA\nX-Forwarded-Proto: https\nCf-Visitor: {\"scheme\":\"https\"}\nAccept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\nUser-Agent: Mozilla/5.0 (compatible; BLEXBot/1.0; +http://webmeup-crawler.com/)\nCookie: __cfduid=df285ae8bdea79f7600a2c4d1f6e3ca8d1536962385; session=eyJsb2NhbGUiOiJwbCJ9.Dn3A_Q.uJU-4Nx5S8sZvmJxWO-0k5ymMn8\nCf-Connecting-Ip: 2a01:4f8:10b:d9f:0:0:0:2\nX-Forwarded-Host: pennydreadfulmagic.com\nX-Forwarded-Server: pennydreadfulmagic.com\nConnection: Keep-Alive\n```\n--------------------------------------------------------------------------------\nDatabaseException\nFailed to execute `\n        SELECT\n            d.id,\n            ROUND(SUM(CASE WHEN dm.games > odm.games THEN 1 ELSE 0 END) / NULLIF((SUM(CASE WHEN dm.games <> odm.games THEN 1 ELSE 0 END)), 0), 2) * 100 AS omw\n        FROM\n            deck AS d\n        INNER JOIN\n            deck_match AS my_dm ON my_dm.deck_id = d.id\n        LEFT JOIN\n            deck_match AS my_odm ON my_odm.match_id = my_dm.match_id AND my_odm.deck_id <> d.id\n        INNER JOIN\n            deck AS od ON od.id = my_odm.deck_id\n        INNER JOIN\n            deck_match AS dm ON dm.deck_id = od.id\n        LEFT JOIN\n            deck_match AS odm ON odm.match_id = dm.match_id AND odm.deck_id <> dm.deck_id\n        INNER JOIN\n            `match` AS m ON m.id = dm.match_id\n        WHERE\n            d.id IN ()\n        GROUP BY\n            d.id\n    ` with `[]` because of `(1064, \"You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ')\\n        GROUP BY\\n            d.id' at line 19\")`\nStack Trace:\n```\n  File \"/home/discord/.local/lib/python3.6/site-packages/flask/app.py\", line 2309, in __call__\n    return self.wsgi_app(environ, start_response)\n  File \"/home/discord/.local/lib/python3.6/site-packages/flask/app.py\", line 2295, in wsgi_app\n    response = self.handle_exception(e)\n  File \"/home/discord/.local/lib/python3.6/site-packages/flask/app.py\", line 2292, in wsgi_app\n    response = self.full_dispatch_request()\n  File \"/home/discord/.local/lib/python3.6/site-packages/flask/app.py\", line 1815, in full_dispatch_request\n    rv = self.handle_user_exception(e)\n  File \"/home/discord/.local/lib/python3.6/site-packages/flask/app.py\", line 1718, in handle_user_exception\n    reraise(exc_type, exc_value, tb)\n  File \"/home/discord/.local/lib/python3.6/site-packages/flask/_compat.py\", line 35, in reraise\n    raise value\n  File \"/home/discord/.local/lib/python3.6/site-packages/flask/app.py\", line 1813, in full_dispatch_request\n    rv = self.dispatch_request()\n  File \"/home/discord/.local/lib/python3.6/site-packages/flask/app.py\", line 1799, in dispatch_request\n    return self.view_functions[rule.endpoint](**req.view_args)\n  File \"./decksite/cache.py\", line 79, in decorated_function\n    response = make_response(f(*args, **kwargs))\n  File \"./decksite/main.py\", line 87, in person\n    view = Person(p, person_cards, only_played_cards)\n  File \"./decksite/views/person.py\", line 18, in __init__\n    self.decks = person.decks\n  File \"./decksite/data/person.py\", line 17, in decks\n    self.__decks = deck.load_decks(f'd.person_id = {self.id}', season_id=self.season_id)\n  File \"./decksite/data/deck.py\", line 112, in load_decks\n    loaded_decks = load_decks_heavy(where)\n  File \"./decksite/data/deck.py\", line 225, in load_decks_heavy\n    load_competitive_stats(decks)\n  File \"./decksite/data/deck.py\", line 526, in load_competitive_stats\n    rs = db().select(sql)\n  File \"./shared/database.py\", line 41, in select\n    [_, rows] = self.execute_anything(sql, args)\n  File \"./shared/database.py\", line 60, in execute_anything\n    raise DatabaseException('Failed to execute `{sql}` with `{args}` because of `{e}`'.format(sql=sql, args=args, e=e))\n\n```\n"}}
{"actor":{"display_login":"vorpal-buildbot"}}