PennyDreadfulMTG / perf-reports

2 stars 2 forks source link

500 error at /matchups/ #42787

Closed vorpal-buildbot closed 5 years ago

vorpal-buildbot commented 5 years ago

Failed to execute ` SELECT d.id, d.finish, d.decklist_hash, cache.active_date, cache.wins, cache.losses, cache.draws, ct.name AS competition_type_name FROM deck AS d

    LEFT JOIN
        competition AS c ON d.competition_id = c.id
    LEFT JOIN
        competition_series AS cs ON cs.id = c.competition_series_id
    LEFT JOIN
        competition_type AS ct ON ct.id = cs.competition_type_id

    LEFT JOIN
        deck_cache AS cache ON d.id = cache.deck_id

    LEFT JOIN
        (
            SELECT
                `start`.id,
                `start`.code,
                `start`.start_date AS start_date,
                `end`.start_date AS end_date
            FROM
                season AS `start`
            LEFT JOIN
                season AS `end` ON `end`.id = `start`.id + 1
        ) AS season ON season.start_date <= d.created_date AND (season.end_date IS NULL OR season.end_date > d.created_date)

    WHERE
        (d.id IN ()) AND (TRUE)
    GROUP BY
        d.id,
        d.competition_id, -- Every deck has only one competition_id but if we want to use competition_id in the HAVING clause we need this.
        season.id -- In theory this is not necessary as all decks are in a single season and we join on the date but MySQL cannot work that out so give it the hint it needs.
    HAVING
        1 = 1
    ORDER BY
        active_date DESC, d.finish IS NULL, d.finish

` 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 ')) AND (TRUE)\n        GROUP BY\n            d.id,\n            d.competition_id, -' at line 38")`

Reported on decksite by flac0


Request Data ``` Request Method: GET Path: /matchups/?season_id=11&hero_archetype_id=16&hero_person_id=1877&hero_card=&enemy_archetype_id=&enemy_person_id=&enemy_card= Cookies: {'__cfduid': 'dc2f381085806ba8d88189016017565e61521681072', '_ga': 'GA1.2.1518460170.1521681078', 'hide_intro': 'True', '_gid': 'GA1.2.194635858.1552803868', 'session': '.eJx9UdFOgzAU_Zf7TEw7YMDeRLcgbGY6NSbGkK4U1tgCtmUBl_27Zcm2BxMfz7mn59x7eoC8ZUqSmtUGZkZ1zAFSSF7DrCRCW1QwyWVTnIcF17RRRc4tA56Hp6EfYBxEEx95oReCA_9M6rzquLh4iYYSwaya1TCiqmLFuI5u6pM_DoPAAWmqJu80UzWRo7gUhCKrb0hndpNcG2JGmr7OM71ISdujVerGt4OQcq76ZJlivuivetN82bjZAQilTOszBr1-un_erBu6HB7fgix2N2bYmqSLk_1-Fdn3rG-5YjontijsexMfI-T7N5Hr4SgKr_Oxu6k9GSEHFCsttbuEbLj7cJdu_R-aZaZ7D-nLVHilLFDyzYbShthyW3vNh23R_ggvB8udOtPw6cDJJjfDKIGYEcUUHB34U5khqmJ2zboT4vgLmAmbDg.D3B6xQ.CXLO5uai0jS3laU55B4x0Hh0NfY'} Endpoint: matchups View Args: {} Person: 441685711792504848 Referrer: https://pennydreadfulmagic.com/matchups/?season_id=&hero_archetype_id=&hero_person_id=1877&hero_card=&enemy_archetype_id=16&enemy_person_id=&enemy_card= Request Data: {} Host: pennydreadfulmagic.com Accept-Encoding: gzip Cf-Ipcountry: CA X-Forwarded-For: 184.147.60.148, 162.158.75.186 Cf-Ray: 4b932b468bf65588-ORD X-Forwarded-Proto: https Cf-Visitor: {"scheme":"https"} Upgrade-Insecure-Requests: 1 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121 Safari/537.36 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8 Referer: https://pennydreadfulmagic.com/matchups/?season_id=&hero_archetype_id=&hero_person_id=1877&hero_card=&enemy_archetype_id=16&enemy_person_id=&enemy_card= Accept-Language: en-US,en;q=0.9 Cookie: __cfduid=dc2f381085806ba8d88189016017565e61521681072; _ga=GA1.2.1518460170.1521681078; hide_intro=True; _gid=GA1.2.194635858.1552803868; session=.eJx9UdFOgzAU_Zf7TEw7YMDeRLcgbGY6NSbGkK4U1tgCtmUBl_27Zcm2BxMfz7mn59x7eoC8ZUqSmtUGZkZ1zAFSSF7DrCRCW1QwyWVTnIcF17RRRc4tA56Hp6EfYBxEEx95oReCA_9M6rzquLh4iYYSwaya1TCiqmLFuI5u6pM_DoPAAWmqJu80UzWRo7gUhCKrb0hndpNcG2JGmr7OM71ISdujVerGt4OQcq76ZJlivuivetN82bjZAQilTOszBr1-un_erBu6HB7fgix2N2bYmqSLk_1-Fdn3rG-5YjontijsexMfI-T7N5Hr4SgKr_Oxu6k9GSEHFCsttbuEbLj7cJdu_R-aZaZ7D-nLVHilLFDyzYbShthyW3vNh23R_ggvB8udOtPw6cDJJjfDKIGYEcUUHB34U5khqmJ2zboT4vgLmAmbDg.D3B6xQ.CXLO5uai0jS3laU55B4x0Hh0NfY Cf-Connecting-Ip: 184.147.60.148 Cdn-Loop: cloudflare X-Forwarded-Host: pennydreadfulmagic.com X-Forwarded-Server: pennydreadfulmagic.com Connection: Keep-Alive ```

DatabaseException Failed to execute ` SELECT d.id, d.finish, d.decklist_hash, cache.active_date, cache.wins, cache.losses, cache.draws, ct.name AS competition_type_name FROM deck AS d LEFT JOIN competition AS c ON d.competition_id = c.id LEFT JOIN competition_series AS cs ON cs.id = c.competition_series_id LEFT JOIN competition_type AS ct ON ct.id = cs.competition_type_id LEFT JOIN deck_cache AS cache ON d.id = cache.deck_id LEFT JOIN ( SELECT `start`.id, `start`.code, `start`.start_date AS start_date, `end`.start_date AS end_date FROM season AS `start` LEFT JOIN season AS `end` ON `end`.id = `start`.id + 1 ) AS season ON season.start_date <= d.created_date AND (season.end_date IS NULL OR season.end_date > d.created_date) WHERE (d.id IN ()) AND (TRUE) GROUP BY d.id, d.competition_id, -- Every deck has only one competition_id but if we want to use competition_id in the HAVING clause we need this. season.id -- In theory this is not necessary as all decks are in a single season and we join on the date but MySQL cannot work that out so give it the hint it needs. HAVING 1 = 1 ORDER BY active_date DESC, d.finish IS NULL, d.finish ` 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 ')) AND (TRUE)\n GROUP BY\n d.id,\n d.competition_id, -' at line 38")` Stack Trace: ``` Python traceback File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 2309, in __call__ return self.wsgi_app(environ, start_response) File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 2295, in wsgi_app response = self.handle_exception(e) File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 2292, in wsgi_app response = self.full_dispatch_request() File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 1815, in full_dispatch_request rv = self.handle_user_exception(e) File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 1718, in handle_user_exception reraise(exc_type, exc_value, tb) File "/home/discord/.local/lib/python3.6/site-packages/flask/_compat.py", line 35, in reraise raise value File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 1813, in full_dispatch_request rv = self.dispatch_request() File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 1799, in dispatch_request return self.view_functions[rule.endpoint](**req.view_args) File "./decksite/main.py", line 279, in matchups results = mus.matchup(hero, enemy, season_id=season_id) if request.args else {} File "./decksite/data/matchup.py", line 51, in matchup results['hero_decks'] = deck.load_decks('d.id IN (' + ', '.join(results['hero_deck_ids']) + ')') File "./decksite/data/deck.py", line 94, in load_decks rows = db().select(sql) File "./shared/database.py", line 41, in select [_, rows] = self.execute_anything(sql, args) File "./shared/database.py", line 60, in execute_anything raise DatabaseException('Failed to execute `{sql}` with `{args}` because of `{e}`'.format(sql=sql, args=args, e=e)) ```

Exception_hash: 1ac391d11ae0cd854fbefe228536953999816739

vorpal-buildbot commented 5 years ago

500 error at /matchups/

Failed to execute ` SELECT d.id, d.finish, d.decklist_hash, cache.active_date, cache.wins, cache.losses, cache.draws, ct.name AS competition_type_name FROM deck AS d

    LEFT JOIN
        competition AS c ON d.competition_id = c.id
    LEFT JOIN
        competition_series AS cs ON cs.id = c.competition_series_id
    LEFT JOIN
        competition_type AS ct ON ct.id = cs.competition_type_id

    LEFT JOIN
        deck_cache AS cache ON d.id = cache.deck_id

    LEFT JOIN
        (
            SELECT
                `start`.id,
                `start`.code,
                `start`.start_date AS start_date,
                `end`.start_date AS end_date
            FROM
                season AS `start`
            LEFT JOIN
                season AS `end` ON `end`.id = `start`.id + 1
        ) AS season ON season.start_date <= d.created_date AND (season.end_date IS NULL OR season.end_date > d.created_date)

    WHERE
        (d.id IN ()) AND (TRUE)
    GROUP BY
        d.id,
        d.competition_id, -- Every deck has only one competition_id but if we want to use competition_id in the HAVING clause we need this.
        season.id -- In theory this is not necessary as all decks are in a single season and we join on the date but MySQL cannot work that out so give it the hint it needs.
    HAVING
        1 = 1
    ORDER BY
        active_date DESC, d.finish IS NULL, d.finish

` 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 ')) AND (TRUE)\n        GROUP BY\n            d.id,\n            d.competition_id, -' at line 38")`

Reported on decksite by cluelessinnistradboi


Request Data ``` Request Method: GET Path: /matchups/?season_id=11&hero_archetype_id=73&hero_person_id=&hero_card=&enemy_archetype_id=64&enemy_person_id=&enemy_card= Cookies: {'session': '.eJx9UV1PwjAU_S_3eTH7YOvGmwiIURQlAokxS9kuo9K1o-2EQfjvdiTIg4mP59xzz7k9PUJaoSqpQGGga1SNDtC8ZAK6K8q1RTmWrJT5FTOdSZWnzFLgJYSQMPYDQtzIC2M3Bgf-mYi0qBnPL0lcZpSjVaOAFhUF5u09Woqzf-B3IgdKU8i01qgELVtxxmvkqDUTgmmjaL6UzK5LWpu1n2pDTataTPqHIXuq1UG93XvjPAjnu6a_mEaDSorxVW_kxqZ3j0CzzJpeMCzZeLTdD5v33WD3Uk0equfqjuGXuDW4cJXdx33FFOqU2uK8MPSS0A9898YlCYmS6Dpvu4zcTuy6DihcWWr9GxJ_Tx5f53zTmFkQ-6MtJdPecjIkvU0SztoQ23VlX_NhS7U_xFaN5c4Vavh04GyTmqaVQA-pQgUnB_40aKgq0J4pas5PPycZolY.D3fQxg.xq6VaycfwqaI3h3iig2_KxKPt2g', '__cfduid': 'db925bc028bc4091fcb127e8a9121a17f1553349912'} Endpoint: matchups View Args: {} Person: 197775823770615808 Referrer: https://pennydreadfulmagic.com/matchups/?season_id=11&hero_archetype_id=73&hero_person_id=&hero_card=&enemy_archetype_id=103&enemy_person_id=&enemy_card= Request Data: {} Host: pennydreadfulmagic.com Accept-Encoding: gzip Cf-Ipcountry: DE X-Forwarded-For: 87.188.81.224, 162.158.89.93 Cf-Ray: 4bc103c7befc96dc-FRA X-Forwarded-Proto: https Cf-Visitor: {"scheme":"https"} User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:65.0) Gecko/20100101 Firefox/65.0 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8 Accept-Language: en-US,en;q=0.5 Referer: https://pennydreadfulmagic.com/matchups/?season_id=11&hero_archetype_id=73&hero_person_id=&hero_card=&enemy_archetype_id=103&enemy_person_id=&enemy_card= Upgrade-Insecure-Requests: 1 Cookie: session=.eJx9UV1PwjAU_S_3eTH7YOvGmwiIURQlAokxS9kuo9K1o-2EQfjvdiTIg4mP59xzz7k9PUJaoSqpQGGga1SNDtC8ZAK6K8q1RTmWrJT5FTOdSZWnzFLgJYSQMPYDQtzIC2M3Bgf-mYi0qBnPL0lcZpSjVaOAFhUF5u09Woqzf-B3IgdKU8i01qgELVtxxmvkqDUTgmmjaL6UzK5LWpu1n2pDTataTPqHIXuq1UG93XvjPAjnu6a_mEaDSorxVW_kxqZ3j0CzzJpeMCzZeLTdD5v33WD3Uk0equfqjuGXuDW4cJXdx33FFOqU2uK8MPSS0A9898YlCYmS6Dpvu4zcTuy6DihcWWr9GxJ_Tx5f53zTmFkQ-6MtJdPecjIkvU0SztoQ23VlX_NhS7U_xFaN5c4Vavh04GyTmqaVQA-pQgUnB_40aKgq0J4pas5PPycZolY.D3fQxg.xq6VaycfwqaI3h3iig2_KxKPt2g; __cfduid=db925bc028bc4091fcb127e8a9121a17f1553349912 Cf-Connecting-Ip: 87.188.81.224 Cdn-Loop: cloudflare X-Forwarded-Host: pennydreadfulmagic.com X-Forwarded-Server: pennydreadfulmagic.com Connection: Keep-Alive ```

DatabaseException Failed to execute ` SELECT d.id, d.finish, d.decklist_hash, cache.active_date, cache.wins, cache.losses, cache.draws, ct.name AS competition_type_name FROM deck AS d LEFT JOIN competition AS c ON d.competition_id = c.id LEFT JOIN competition_series AS cs ON cs.id = c.competition_series_id LEFT JOIN competition_type AS ct ON ct.id = cs.competition_type_id LEFT JOIN deck_cache AS cache ON d.id = cache.deck_id LEFT JOIN ( SELECT `start`.id, `start`.code, `start`.start_date AS start_date, `end`.start_date AS end_date FROM season AS `start` LEFT JOIN season AS `end` ON `end`.id = `start`.id + 1 ) AS season ON season.start_date <= d.created_date AND (season.end_date IS NULL OR season.end_date > d.created_date) WHERE (d.id IN ()) AND (TRUE) GROUP BY d.id, d.competition_id, -- Every deck has only one competition_id but if we want to use competition_id in the HAVING clause we need this. season.id -- In theory this is not necessary as all decks are in a single season and we join on the date but MySQL cannot work that out so give it the hint it needs. HAVING 1 = 1 ORDER BY active_date DESC, d.finish IS NULL, d.finish ` 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 ')) AND (TRUE)\n GROUP BY\n d.id,\n d.competition_id, -' at line 38")` Stack Trace: ``` Python traceback File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 2309, in __call__ return self.wsgi_app(environ, start_response) File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 2295, in wsgi_app response = self.handle_exception(e) File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 2292, in wsgi_app response = self.full_dispatch_request() File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 1815, in full_dispatch_request rv = self.handle_user_exception(e) File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 1718, in handle_user_exception reraise(exc_type, exc_value, tb) File "/home/discord/.local/lib/python3.6/site-packages/flask/_compat.py", line 35, in reraise raise value File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 1813, in full_dispatch_request rv = self.dispatch_request() File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 1799, in dispatch_request return self.view_functions[rule.endpoint](**req.view_args) File "./decksite/main.py", line 279, in matchups results = mus.matchup(hero, enemy, season_id=season_id) if request.args else {} File "./decksite/data/matchup.py", line 51, in matchup results['hero_decks'] = deck.load_decks('d.id IN (' + ', '.join(results['hero_deck_ids']) + ')') File "./decksite/data/deck.py", line 94, in load_decks rows = db().select(sql) File "./shared/database.py", line 41, in select [_, rows] = self.execute_anything(sql, args) File "./shared/database.py", line 60, in execute_anything raise DatabaseException('Failed to execute `{sql}` with `{args}` because of `{e}`'.format(sql=sql, args=args, e=e)) ```

Exception_hash: 1ac391d11ae0cd854fbefe228536953999816739

Labels: decksite; DatabaseException

vorpal-buildbot commented 5 years ago

500 error at /matchups/

Failed to execute ` SELECT d.id, d.finish, d.decklist_hash, cache.active_date, cache.wins, cache.losses, cache.draws, ct.name AS competition_type_name FROM deck AS d

    LEFT JOIN
        competition AS c ON d.competition_id = c.id
    LEFT JOIN
        competition_series AS cs ON cs.id = c.competition_series_id
    LEFT JOIN
        competition_type AS ct ON ct.id = cs.competition_type_id

    LEFT JOIN
        deck_cache AS cache ON d.id = cache.deck_id

    LEFT JOIN
        (
            SELECT
                `start`.id,
                `start`.code,
                `start`.start_date AS start_date,
                `end`.start_date AS end_date
            FROM
                season AS `start`
            LEFT JOIN
                season AS `end` ON `end`.id = `start`.id + 1
        ) AS season ON season.start_date <= d.created_date AND (season.end_date IS NULL OR season.end_date > d.created_date)

    WHERE
        (d.id IN ()) AND (TRUE)
    GROUP BY
        d.id,
        d.competition_id, -- Every deck has only one competition_id but if we want to use competition_id in the HAVING clause we need this.
        season.id -- In theory this is not necessary as all decks are in a single season and we join on the date but MySQL cannot work that out so give it the hint it needs.
    HAVING
        1 = 1
    ORDER BY
        active_date DESC, d.finish IS NULL, d.finish

` 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 ')) AND (TRUE)\n        GROUP BY\n            d.id,\n            d.competition_id, -' at line 38")`

Reported on decksite by bakert99


Request Data ``` Request Method: GET Path: /matchups/?season_id=11&hero_archetype_id=&hero_person_id=143&hero_card=Turn+Aside&enemy_archetype_id=&enemy_person_id=&enemy_card= Cookies: {'hide_intro': 'True', '_ga': 'GA1.2.336853490.1519750417', 'session': '.eJx9UctuwjAQ_Befo8p5OCTcSiXKu6iIKm1VRSbZGIfERrbDU_x7HSRA6qHHmZ2d3Z09o3QLqqYChEFdoxpwEM1rLm4gh5rXMr9DrjOp8pRbBrkxCYMgdjs4coMAeyFBDvqnIlLW8OruVcmMVmDVIFCLGIO83UZLcfV3A99BtWEybTQoQetWu6IbUCaObYekjVl7qTbUtJVy-Hz4mOEJG_mJPy320x1PsBycOpPx6I089EZu7MDuGdEsA61vGA2byP3c97zF7rSazaq6_5rk1PfMbs5gMbb9cNhyBTqlNimXED8k2F74FGLSCQPvUW_DC3EQYewgBYWl1vchUTF4pnqXl8t10rgvGSuir2VZ9t8385AYO8TGu7XXfNsc7Ut4cbTcNTWNfhx0tUnNsZWgHlAFCl0c9Dc0QxUDu6VoquryC0sLmtc.D3xkmg.L8DKvTUjViZUgz4ftERIMd3V9ig', '__cfduid': 'd844973ee0835fa0190865a3449ecc30f1551024056', '_gid': 'GA1.2.928467989.1553481783', 'deck_id': '43449', '_gat_gtag_UA_109131120_1': '1'} Endpoint: matchups View Args: {} Person: 195644917081440265 Referrer: https://pennydreadfulmagic.com/matchups/?season_id=&hero_archetype_id=&hero_person_id=143&hero_card=Unsummon&enemy_archetype_id=&enemy_person_id=&enemy_card= Request Data: {} Host: pennydreadfulmagic.com Accept-Encoding: gzip Cf-Ipcountry: US X-Forwarded-For: 136.25.24.135, 172.68.189.225 Cf-Ray: 4bdd9f3e68046c1c-SJC X-Forwarded-Proto: https Cf-Visitor: {"scheme":"https"} Upgrade-Insecure-Requests: 1 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121 Safari/537.36 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8 Referer: https://pennydreadfulmagic.com/matchups/?season_id=&hero_archetype_id=&hero_person_id=143&hero_card=Unsummon&enemy_archetype_id=&enemy_person_id=&enemy_card= Accept-Language: en-US,en;q=0.9,es;q=0.8 Cookie: hide_intro=True; _ga=GA1.2.336853490.1519750417; session=.eJx1UMtuwjAQ_Jc9R5WdOIFwa-krFETpA0SrKnLjjbEwSWQ7LRTx73WQWqRKPc7OzM7u7IGLjapg4EyLAQhli9qIXAkYAE3jhLGU9kifMkbCJIYA_md0XXCNnsXqiKREkTdobF0d91EWBbBxss5bi6bim077ztdoXJp6R81btwpz67jrmCa-nt-vvrLJAxU8VDflKJlenketmutyvjnpXb32gYM98KJAa38wCDvZsueR1Io1ajyT2dPQluMleYnccmG8H7eNMmhz7vxtcRjTME3S6IwkaS_q0xPftZMQ1ickAIOlH61-Q8Lk8e52PB2S2cdVJsvPUVYg0b0FnRq5HfoQX2fjv3n1vWHlVLnzM9kqLSy8BXBck7tdJ4EL5AYNHAL4W5rjRqK_smq1PnwDU6SI9w.Dfj1kQ.6zIYF2Bw9YqqBtAVtkhDIFSf-AA; __cfduid=d844973ee0835fa0190865a3449ecc30f1551024056; _gid=GA1.2.928467989.1553481783; deck_id=43449; _gat_gtag_UA_109131120_1=1; session=.eJx9UctuwjAQ_Befo8p5OCTcSiXKu6iIKm1VRSbZGIfERrbDU_x7HSRA6qHHmZ2d3Z09o3QLqqYChEFdoxpwEM1rLm4gh5rXMr9DrjOp8pRbBrkxCYMgdjs4coMAeyFBDvqnIlLW8OruVcmMVmDVIFCLGIO83UZLcfV3A99BtWEybTQoQetWu6IbUCaObYekjVl7qTbUtJVy-Hz4mOEJG_mJPy320x1PsBycOpPx6I089EZu7MDuGdEsA61vGA2byP3c97zF7rSazaq6_5rk1PfMbs5gMbb9cNhyBTqlNimXED8k2F74FGLSCQPvUW_DC3EQYewgBYWl1vchUTF4pnqXl8t10rgvGSuir2VZ9t8385AYO8TGu7XXfNsc7Ut4cbTcNTWNfhx0tUnNsZWgHlAFCl0c9Dc0QxUDu6VoquryC0sLmtc.D3xkmg.L8DKvTUjViZUgz4ftERIMd3V9ig Cf-Connecting-Ip: 136.25.24.135 Cdn-Loop: cloudflare X-Forwarded-Host: pennydreadfulmagic.com X-Forwarded-Server: pennydreadfulmagic.com Connection: Keep-Alive ```

DatabaseException Failed to execute ` SELECT d.id, d.finish, d.decklist_hash, cache.active_date, cache.wins, cache.losses, cache.draws, ct.name AS competition_type_name FROM deck AS d LEFT JOIN competition AS c ON d.competition_id = c.id LEFT JOIN competition_series AS cs ON cs.id = c.competition_series_id LEFT JOIN competition_type AS ct ON ct.id = cs.competition_type_id LEFT JOIN deck_cache AS cache ON d.id = cache.deck_id LEFT JOIN ( SELECT `start`.id, `start`.code, `start`.start_date AS start_date, `end`.start_date AS end_date FROM season AS `start` LEFT JOIN season AS `end` ON `end`.id = `start`.id + 1 ) AS season ON season.start_date <= d.created_date AND (season.end_date IS NULL OR season.end_date > d.created_date) WHERE (d.id IN ()) AND (TRUE) GROUP BY d.id, d.competition_id, -- Every deck has only one competition_id but if we want to use competition_id in the HAVING clause we need this. season.id -- In theory this is not necessary as all decks are in a single season and we join on the date but MySQL cannot work that out so give it the hint it needs. HAVING 1 = 1 ORDER BY active_date DESC, d.finish IS NULL, d.finish ` 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 ')) AND (TRUE)\n GROUP BY\n d.id,\n d.competition_id, -' at line 38")` Stack Trace: ``` Python traceback File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 2309, in __call__ return self.wsgi_app(environ, start_response) File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 2295, in wsgi_app response = self.handle_exception(e) File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 2292, in wsgi_app response = self.full_dispatch_request() File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 1815, in full_dispatch_request rv = self.handle_user_exception(e) File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 1718, in handle_user_exception reraise(exc_type, exc_value, tb) File "/home/discord/.local/lib/python3.6/site-packages/flask/_compat.py", line 35, in reraise raise value File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 1813, in full_dispatch_request rv = self.dispatch_request() File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 1799, in dispatch_request return self.view_functions[rule.endpoint](**req.view_args) File "./decksite/main.py", line 279, in matchups results = mus.matchup(hero, enemy, season_id=season_id) if request.args else {} File "./decksite/data/matchup.py", line 51, in matchup results['hero_decks'] = deck.load_decks('d.id IN (' + ', '.join(results['hero_deck_ids']) + ')') File "./decksite/data/deck.py", line 94, in load_decks rows = db().select(sql) File "./shared/database.py", line 41, in select [_, rows] = self.execute_anything(sql, args) File "./shared/database.py", line 60, in execute_anything raise DatabaseException('Failed to execute `{sql}` with `{args}` because of `{e}`'.format(sql=sql, args=args, e=e)) ```

Exception_hash: 1ac391d11ae0cd854fbefe228536953999816739

Labels: decksite; DatabaseException

vorpal-buildbot commented 5 years ago

500 error at /matchups/

Failed to execute ` SELECT d.id, d.finish, d.decklist_hash, cache.active_date, cache.wins, cache.losses, cache.draws, ct.name AS competition_type_name FROM deck AS d

    LEFT JOIN
        competition AS c ON d.competition_id = c.id
    LEFT JOIN
        competition_series AS cs ON cs.id = c.competition_series_id
    LEFT JOIN
        competition_type AS ct ON ct.id = cs.competition_type_id

    LEFT JOIN
        deck_cache AS cache ON d.id = cache.deck_id

    LEFT JOIN
        (
            SELECT
                `start`.id,
                `start`.code,
                `start`.start_date AS start_date,
                `end`.start_date AS end_date
            FROM
                season AS `start`
            LEFT JOIN
                season AS `end` ON `end`.id = `start`.id + 1
        ) AS season ON season.start_date <= d.created_date AND (season.end_date IS NULL OR season.end_date > d.created_date)

    WHERE
        (d.id IN ()) AND (TRUE)
    GROUP BY
        d.id,
        d.competition_id, -- Every deck has only one competition_id but if we want to use competition_id in the HAVING clause we need this.
        season.id -- In theory this is not necessary as all decks are in a single season and we join on the date but MySQL cannot work that out so give it the hint it needs.
    HAVING
        1 = 1
    ORDER BY
        active_date DESC, d.finish IS NULL, d.finish

` 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 ')) AND (TRUE)\n        GROUP BY\n            d.id,\n            d.competition_id, -' at line 38")`

Reported on decksite by bakert99


Request Data ``` Request Method: GET Path: /matchups/?season_id=11&hero_archetype_id=&hero_person_id=143&hero_card=Turn+Aside&enemy_archetype_id=&enemy_person_id=&enemy_card= Cookies: {'hide_intro': 'True', '_ga': 'GA1.2.336853490.1519750417', 'session': '.eJx9UctuwjAQ_Befo8p5OCTcSiXKu6iIKm1VRSbZGIfERrbDU_x7HSRA6qHHmZ2d3Z09o3QLqqYChEFdoxpwEM1rLm4gh5rXMr9DrjOp8pRbBrkxCYMgdjs4coMAeyFBDvqnIlLW8OruVcmMVmDVIFCLGIO83UZLcfV3A99BtWEybTQoQetWu6IbUCaObYekjVl7qTbUtJVy-Hz4mOEJG_mJPy320x1PsBycOpPx6I089EZu7MDuGdEsA61vGA2byP3c97zF7rSazaq6_5rk1PfMbs5gMbb9cNhyBTqlNimXED8k2F74FGLSCQPvUW_DC3EQYewgBYWl1vchUTF4pnqXl8t10rgvGSuir2VZ9t8385AYO8TGu7XXfNsc7Ut4cbTcNTWNfhx0tUnNsZWgHlAFCl0c9Dc0QxUDu6VoquryC0sLmtc.D3xkpg.PLGEF8AcenKUT6it7z0PEKQKd3U', '__cfduid': 'd844973ee0835fa0190865a3449ecc30f1551024056', '_gid': 'GA1.2.928467989.1553481783', 'deck_id': '43449', '_gat_gtag_UA_109131120_1': '1'} Endpoint: matchups View Args: {} Person: 195644917081440265 Referrer: https://pennydreadfulmagic.com/matchups/?season_id=&hero_archetype_id=&hero_person_id=143&hero_card=Unsummon&enemy_archetype_id=&enemy_person_id=&enemy_card= Request Data: {} Host: pennydreadfulmagic.com Accept-Encoding: gzip Cf-Ipcountry: US X-Forwarded-For: 136.25.24.135, 172.68.189.225 Cf-Ray: 4bdd9f5f39816c1c-SJC X-Forwarded-Proto: https Cf-Visitor: {"scheme":"https"} Cache-Control: max-age=0 Upgrade-Insecure-Requests: 1 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121 Safari/537.36 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8 Referer: https://pennydreadfulmagic.com/matchups/?season_id=&hero_archetype_id=&hero_person_id=143&hero_card=Unsummon&enemy_archetype_id=&enemy_person_id=&enemy_card= Accept-Language: en-US,en;q=0.9,es;q=0.8 Cookie: hide_intro=True; _ga=GA1.2.336853490.1519750417; session=.eJx1UMtuwjAQ_Jc9R5WdOIFwa-krFETpA0SrKnLjjbEwSWQ7LRTx73WQWqRKPc7OzM7u7IGLjapg4EyLAQhli9qIXAkYAE3jhLGU9kifMkbCJIYA_md0XXCNnsXqiKREkTdobF0d91EWBbBxss5bi6bim077ztdoXJp6R81btwpz67jrmCa-nt-vvrLJAxU8VDflKJlenketmutyvjnpXb32gYM98KJAa38wCDvZsueR1Io1ajyT2dPQluMleYnccmG8H7eNMmhz7vxtcRjTME3S6IwkaS_q0xPftZMQ1ickAIOlH61-Q8Lk8e52PB2S2cdVJsvPUVYg0b0FnRq5HfoQX2fjv3n1vWHlVLnzM9kqLSy8BXBck7tdJ4EL5AYNHAL4W5rjRqK_smq1PnwDU6SI9w.Dfj1kQ.6zIYF2Bw9YqqBtAVtkhDIFSf-AA; __cfduid=d844973ee0835fa0190865a3449ecc30f1551024056; _gid=GA1.2.928467989.1553481783; deck_id=43449; _gat_gtag_UA_109131120_1=1; session=.eJx9UctuwjAQ_Befo8p5OCTcSiXKu6iIKm1VRSbZGIfERrbDU_x7HSRA6qHHmZ2d3Z09o3QLqqYChEFdoxpwEM1rLm4gh5rXMr9DrjOp8pRbBrkxCYMgdjs4coMAeyFBDvqnIlLW8OruVcmMVmDVIFCLGIO83UZLcfV3A99BtWEybTQoQetWu6IbUCaObYekjVl7qTbUtJVy-Hz4mOEJG_mJPy320x1PsBycOpPx6I089EZu7MDuGdEsA61vGA2byP3c97zF7rSazaq6_5rk1PfMbs5gMbb9cNhyBTqlNimXED8k2F74FGLSCQPvUW_DC3EQYewgBYWl1vchUTF4pnqXl8t10rgvGSuir2VZ9t8385AYO8TGu7XXfNsc7Ut4cbTcNTWNfhx0tUnNsZWgHlAFCl0c9Dc0QxUDu6VoquryC0sLmtc.D3xkpg.PLGEF8AcenKUT6it7z0PEKQKd3U Cf-Connecting-Ip: 136.25.24.135 Cdn-Loop: cloudflare X-Forwarded-Host: pennydreadfulmagic.com X-Forwarded-Server: pennydreadfulmagic.com Connection: Keep-Alive ```

DatabaseException Failed to execute ` SELECT d.id, d.finish, d.decklist_hash, cache.active_date, cache.wins, cache.losses, cache.draws, ct.name AS competition_type_name FROM deck AS d LEFT JOIN competition AS c ON d.competition_id = c.id LEFT JOIN competition_series AS cs ON cs.id = c.competition_series_id LEFT JOIN competition_type AS ct ON ct.id = cs.competition_type_id LEFT JOIN deck_cache AS cache ON d.id = cache.deck_id LEFT JOIN ( SELECT `start`.id, `start`.code, `start`.start_date AS start_date, `end`.start_date AS end_date FROM season AS `start` LEFT JOIN season AS `end` ON `end`.id = `start`.id + 1 ) AS season ON season.start_date <= d.created_date AND (season.end_date IS NULL OR season.end_date > d.created_date) WHERE (d.id IN ()) AND (TRUE) GROUP BY d.id, d.competition_id, -- Every deck has only one competition_id but if we want to use competition_id in the HAVING clause we need this. season.id -- In theory this is not necessary as all decks are in a single season and we join on the date but MySQL cannot work that out so give it the hint it needs. HAVING 1 = 1 ORDER BY active_date DESC, d.finish IS NULL, d.finish ` 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 ')) AND (TRUE)\n GROUP BY\n d.id,\n d.competition_id, -' at line 38")` Stack Trace: ``` Python traceback File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 2309, in __call__ return self.wsgi_app(environ, start_response) File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 2295, in wsgi_app response = self.handle_exception(e) File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 2292, in wsgi_app response = self.full_dispatch_request() File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 1815, in full_dispatch_request rv = self.handle_user_exception(e) File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 1718, in handle_user_exception reraise(exc_type, exc_value, tb) File "/home/discord/.local/lib/python3.6/site-packages/flask/_compat.py", line 35, in reraise raise value File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 1813, in full_dispatch_request rv = self.dispatch_request() File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 1799, in dispatch_request return self.view_functions[rule.endpoint](**req.view_args) File "./decksite/main.py", line 279, in matchups results = mus.matchup(hero, enemy, season_id=season_id) if request.args else {} File "./decksite/data/matchup.py", line 51, in matchup results['hero_decks'] = deck.load_decks('d.id IN (' + ', '.join(results['hero_deck_ids']) + ')') File "./decksite/data/deck.py", line 94, in load_decks rows = db().select(sql) File "./shared/database.py", line 41, in select [_, rows] = self.execute_anything(sql, args) File "./shared/database.py", line 60, in execute_anything raise DatabaseException('Failed to execute `{sql}` with `{args}` because of `{e}`'.format(sql=sql, args=args, e=e)) ```

Exception_hash: 1ac391d11ae0cd854fbefe228536953999816739

Labels: decksite; DatabaseException

vorpal-buildbot commented 5 years ago

500 error at /matchups/

Failed to execute ` SELECT d.id, d.finish, d.decklist_hash, cache.active_date, cache.wins, cache.losses, cache.draws, ct.name AS competition_type_name FROM deck AS d

    LEFT JOIN
        competition AS c ON d.competition_id = c.id
    LEFT JOIN
        competition_series AS cs ON cs.id = c.competition_series_id
    LEFT JOIN
        competition_type AS ct ON ct.id = cs.competition_type_id

    LEFT JOIN
        deck_cache AS cache ON d.id = cache.deck_id

    LEFT JOIN
        (
            SELECT
                `start`.id,
                `start`.code,
                `start`.start_date AS start_date,
                `end`.start_date AS end_date
            FROM
                season AS `start`
            LEFT JOIN
                season AS `end` ON `end`.id = `start`.id + 1
        ) AS season ON season.start_date <= d.created_date AND (season.end_date IS NULL OR season.end_date > d.created_date)

    WHERE
        (d.id IN ()) AND (TRUE)
    GROUP BY
        d.id,
        d.competition_id, -- Every deck has only one competition_id but if we want to use competition_id in the HAVING clause we need this.
        season.id -- In theory this is not necessary as all decks are in a single season and we join on the date but MySQL cannot work that out so give it the hint it needs.
    HAVING
        1 = 1
    ORDER BY
        active_date DESC, d.finish IS NULL, d.finish

` 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 ')) AND (TRUE)\n        GROUP BY\n            d.id,\n            d.competition_id, -' at line 38")`

Reported on decksite by logged_out


Request Data ``` Request Method: GET Path: /matchups/?season_id=11&hero_archetype_id=&hero_person_id=143&hero_card=Turn+Aside&enemy_archetype_id=&enemy_person_id=&enemy_card= Cookies: {} Endpoint: matchups View Args: {} Person: logged_out Referrer: None Request Data: {} Host: pennydreadfulmagic.com Accept-Encoding: gzip Cf-Ipcountry: US X-Forwarded-For: 35.231.112.87, 172.68.58.241 Cf-Ray: 4bdda08aea67c516-ORD X-Forwarded-Proto: https Cf-Visitor: {"scheme":"https"} User-Agent: Mozilla/5.0 (compatible; Discordbot/2.0; +https://discordapp.com) Cf-Connecting-Ip: 35.231.112.87 Cdn-Loop: cloudflare X-Forwarded-Host: pennydreadfulmagic.com X-Forwarded-Server: pennydreadfulmagic.com Connection: Keep-Alive ```

DatabaseException Failed to execute ` SELECT d.id, d.finish, d.decklist_hash, cache.active_date, cache.wins, cache.losses, cache.draws, ct.name AS competition_type_name FROM deck AS d LEFT JOIN competition AS c ON d.competition_id = c.id LEFT JOIN competition_series AS cs ON cs.id = c.competition_series_id LEFT JOIN competition_type AS ct ON ct.id = cs.competition_type_id LEFT JOIN deck_cache AS cache ON d.id = cache.deck_id LEFT JOIN ( SELECT `start`.id, `start`.code, `start`.start_date AS start_date, `end`.start_date AS end_date FROM season AS `start` LEFT JOIN season AS `end` ON `end`.id = `start`.id + 1 ) AS season ON season.start_date <= d.created_date AND (season.end_date IS NULL OR season.end_date > d.created_date) WHERE (d.id IN ()) AND (TRUE) GROUP BY d.id, d.competition_id, -- Every deck has only one competition_id but if we want to use competition_id in the HAVING clause we need this. season.id -- In theory this is not necessary as all decks are in a single season and we join on the date but MySQL cannot work that out so give it the hint it needs. HAVING 1 = 1 ORDER BY active_date DESC, d.finish IS NULL, d.finish ` 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 ')) AND (TRUE)\n GROUP BY\n d.id,\n d.competition_id, -' at line 38")` Stack Trace: ``` Python traceback File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 2309, in __call__ return self.wsgi_app(environ, start_response) File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 2295, in wsgi_app response = self.handle_exception(e) File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 2292, in wsgi_app response = self.full_dispatch_request() File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 1815, in full_dispatch_request rv = self.handle_user_exception(e) File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 1718, in handle_user_exception reraise(exc_type, exc_value, tb) File "/home/discord/.local/lib/python3.6/site-packages/flask/_compat.py", line 35, in reraise raise value File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 1813, in full_dispatch_request rv = self.dispatch_request() File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 1799, in dispatch_request return self.view_functions[rule.endpoint](**req.view_args) File "./decksite/main.py", line 279, in matchups results = mus.matchup(hero, enemy, season_id=season_id) if request.args else {} File "./decksite/data/matchup.py", line 51, in matchup results['hero_decks'] = deck.load_decks('d.id IN (' + ', '.join(results['hero_deck_ids']) + ')') File "./decksite/data/deck.py", line 94, in load_decks rows = db().select(sql) File "./shared/database.py", line 41, in select [_, rows] = self.execute_anything(sql, args) File "./shared/database.py", line 60, in execute_anything raise DatabaseException('Failed to execute `{sql}` with `{args}` because of `{e}`'.format(sql=sql, args=args, e=e)) ```

Exception_hash: 1ac391d11ae0cd854fbefe228536953999816739

Labels: decksite; DatabaseException

vorpal-buildbot commented 5 years ago

500 error at /matchups/

Failed to execute ` SELECT d.id, d.finish, d.decklist_hash, cache.active_date, cache.wins, cache.losses, cache.draws, ct.name AS competition_type_name FROM deck AS d

    LEFT JOIN
        competition AS c ON d.competition_id = c.id
    LEFT JOIN
        competition_series AS cs ON cs.id = c.competition_series_id
    LEFT JOIN
        competition_type AS ct ON ct.id = cs.competition_type_id

    LEFT JOIN
        deck_cache AS cache ON d.id = cache.deck_id

    LEFT JOIN
        (
            SELECT
                `start`.id,
                `start`.code,
                `start`.start_date AS start_date,
                `end`.start_date AS end_date
            FROM
                season AS `start`
            LEFT JOIN
                season AS `end` ON `end`.id = `start`.id + 1
        ) AS season ON season.start_date <= d.created_date AND (season.end_date IS NULL OR season.end_date > d.created_date)

    WHERE
        (d.id IN ()) AND (TRUE)
    GROUP BY
        d.id,
        d.competition_id, -- Every deck has only one competition_id but if we want to use competition_id in the HAVING clause we need this.
        season.id -- In theory this is not necessary as all decks are in a single season and we join on the date but MySQL cannot work that out so give it the hint it needs.
    HAVING
        1 = 1
    ORDER BY
        active_date DESC, d.finish IS NULL, d.finish

` 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 ')) AND (TRUE)\n        GROUP BY\n            d.id,\n            d.competition_id, -' at line 38")`

Reported on decksite by logged_out


Request Data ``` Request Method: GET Path: /matchups/?season_id=11&hero_archetype_id=&hero_person_id=143&hero_card=Turn+Aside&enemy_archetype_id=&enemy_person_id=&enemy_card= Cookies: {'__cfduid': 'db420607571b77027a7a1cc6a0c1b20fc1551693255', 'hide_intro': 'True'} Endpoint: matchups View Args: {} Person: logged_out Referrer: None Request Data: {} Host: pennydreadfulmagic.com Accept-Encoding: gzip Cf-Ipcountry: IE X-Forwarded-For: 147.252.140.226, 162.158.39.13 Cf-Ray: 4be04c1c1a53a6cb-DUB X-Forwarded-Proto: https Cf-Visitor: {"scheme":"https"} User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:66.0) Gecko/20100101 Firefox/66.0 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Language: en-GB,en;q=0.5 Dnt: 1 Upgrade-Insecure-Requests: 1 Cookie: __cfduid=db420607571b77027a7a1cc6a0c1b20fc1551693255; hide_intro=True Cf-Connecting-Ip: 147.252.140.226 Cdn-Loop: cloudflare X-Forwarded-Host: pennydreadfulmagic.com X-Forwarded-Server: pennydreadfulmagic.com Connection: Keep-Alive ```

DatabaseException Failed to execute ` SELECT d.id, d.finish, d.decklist_hash, cache.active_date, cache.wins, cache.losses, cache.draws, ct.name AS competition_type_name FROM deck AS d LEFT JOIN competition AS c ON d.competition_id = c.id LEFT JOIN competition_series AS cs ON cs.id = c.competition_series_id LEFT JOIN competition_type AS ct ON ct.id = cs.competition_type_id LEFT JOIN deck_cache AS cache ON d.id = cache.deck_id LEFT JOIN ( SELECT `start`.id, `start`.code, `start`.start_date AS start_date, `end`.start_date AS end_date FROM season AS `start` LEFT JOIN season AS `end` ON `end`.id = `start`.id + 1 ) AS season ON season.start_date <= d.created_date AND (season.end_date IS NULL OR season.end_date > d.created_date) WHERE (d.id IN ()) AND (TRUE) GROUP BY d.id, d.competition_id, -- Every deck has only one competition_id but if we want to use competition_id in the HAVING clause we need this. season.id -- In theory this is not necessary as all decks are in a single season and we join on the date but MySQL cannot work that out so give it the hint it needs. HAVING 1 = 1 ORDER BY active_date DESC, d.finish IS NULL, d.finish ` 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 ')) AND (TRUE)\n GROUP BY\n d.id,\n d.competition_id, -' at line 38")` Stack Trace: ``` Python traceback File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 2309, in __call__ return self.wsgi_app(environ, start_response) File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 2295, in wsgi_app response = self.handle_exception(e) File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 2292, in wsgi_app response = self.full_dispatch_request() File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 1815, in full_dispatch_request rv = self.handle_user_exception(e) File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 1718, in handle_user_exception reraise(exc_type, exc_value, tb) File "/home/discord/.local/lib/python3.6/site-packages/flask/_compat.py", line 35, in reraise raise value File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 1813, in full_dispatch_request rv = self.dispatch_request() File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 1799, in dispatch_request return self.view_functions[rule.endpoint](**req.view_args) File "./decksite/main.py", line 279, in matchups results = mus.matchup(hero, enemy, season_id=season_id) if request.args else {} File "./decksite/data/matchup.py", line 51, in matchup results['hero_decks'] = deck.load_decks('d.id IN (' + ', '.join(results['hero_deck_ids']) + ')') File "./decksite/data/deck.py", line 94, in load_decks rows = db().select(sql) File "./shared/database.py", line 41, in select [_, rows] = self.execute_anything(sql, args) File "./shared/database.py", line 60, in execute_anything raise DatabaseException('Failed to execute `{sql}` with `{args}` because of `{e}`'.format(sql=sql, args=args, e=e)) ```

Exception_hash: 1ac391d11ae0cd854fbefe228536953999816739

Labels: decksite; DatabaseException

vorpal-buildbot commented 5 years ago

500 error at /matchups/

Failed to execute ` SELECT d.id, d.finish, d.decklist_hash, cache.active_date, cache.wins, cache.losses, cache.draws, ct.name AS competition_type_name FROM deck AS d

    LEFT JOIN
        competition AS c ON d.competition_id = c.id
    LEFT JOIN
        competition_series AS cs ON cs.id = c.competition_series_id
    LEFT JOIN
        competition_type AS ct ON ct.id = cs.competition_type_id

    LEFT JOIN
        deck_cache AS cache ON d.id = cache.deck_id

    LEFT JOIN
        (
            SELECT
                `start`.id,
                `start`.code,
                `start`.start_date AS start_date,
                `end`.start_date AS end_date
            FROM
                season AS `start`
            LEFT JOIN
                season AS `end` ON `end`.id = `start`.id + 1
        ) AS season ON season.start_date <= d.created_date AND (season.end_date IS NULL OR season.end_date > d.created_date)

    WHERE
        (d.id IN ()) AND (TRUE)
    GROUP BY
        d.id,
        d.competition_id, -- Every deck has only one competition_id but if we want to use competition_id in the HAVING clause we need this.
        season.id -- In theory this is not necessary as all decks are in a single season and we join on the date but MySQL cannot work that out so give it the hint it needs.
    HAVING
        1 = 1
    ORDER BY
        active_date DESC, d.finish IS NULL, d.finish

` 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 ')) AND (TRUE)\n        GROUP BY\n            d.id,\n            d.competition_id, -' at line 38")`

Reported on decksite by bakert99


Request Data ``` Request Method: GET Path: /matchups/?season_id=11&hero_archetype_id=109&hero_person_id=143&hero_card=&enemy_archetype_id=&enemy_person_id=&enemy_card= Cookies: {'hide_intro': 'True', '_ga': 'GA1.2.336853490.1519750417', 'session': '.eJx9UctuwjAQ_Befo8p5OCTcSiXKu6iIKm1VRSbZGIfERrbDU_x7HSRA6qHHmZ2d3Z09o3QLqqYChEFdoxpwEM1rLm4gh5rXMr9DrjOp8pRbBrkxCYMgdjs4coMAeyFBDvqnIlLW8OruVcmMVmDVIFCLGIO83UZLcfV3A99BtWEybTQoQetWu6IbUCaObYekjVl7qTbUtJVy-Hz4mOEJG_mJPy320x1PsBycOpPx6I089EZu7MDuGdEsA61vGA2byP3c97zF7rSazaq6_5rk1PfMbs5gMbb9cNhyBTqlNimXED8k2F74FGLSCQPvUW_DC3EQYewgBYWl1vchUTF4pnqXl8t10rgvGSuir2VZ9t8385AYO8TGu7XXfNsc7Ut4cbTcNTWNfhx0tUnNsZWgHlAFCl0c9Dc0QxUDu6VoquryC0sLmtc.D4MwIA.HfnJ_WxWydCebu1Y2xxsIs9R6Eo', '__cfduid': 'd844973ee0835fa0190865a3449ecc30f1551024056', 'deck_id': '43474', '_gid': 'GA1.2.2028602575.1554008286'} Endpoint: matchups View Args: {} Person: 195644917081440265 Referrer: https://pennydreadfulmagic.com/matchups/?season_id=&hero_archetype_id=196&hero_person_id=143&hero_card=&enemy_archetype_id=&enemy_person_id=&enemy_card= Request Data: {} Host: pennydreadfulmagic.com Accept-Encoding: gzip Cf-Ipcountry: CA X-Forwarded-For: 209.91.110.197, 162.158.106.92 Cf-Ray: 4c081e916f24c97f-SEA X-Forwarded-Proto: https Cf-Visitor: {"scheme":"https"} Upgrade-Insecure-Requests: 1 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.86 Safari/537.36 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3 Referer: https://pennydreadfulmagic.com/matchups/?season_id=&hero_archetype_id=196&hero_person_id=143&hero_card=&enemy_archetype_id=&enemy_person_id=&enemy_card= Accept-Language: en-US,en;q=0.9,es;q=0.8 Cookie: hide_intro=True; _ga=GA1.2.336853490.1519750417; session=.eJx1UMtuwjAQ_Jc9R5WdOIFwa-krFETpA0SrKnLjjbEwSWQ7LRTx73WQWqRKPc7OzM7u7IGLjapg4EyLAQhli9qIXAkYAE3jhLGU9kifMkbCJIYA_md0XXCNnsXqiKREkTdobF0d91EWBbBxss5bi6bim077ztdoXJp6R81btwpz67jrmCa-nt-vvrLJAxU8VDflKJlenketmutyvjnpXb32gYM98KJAa38wCDvZsueR1Io1ajyT2dPQluMleYnccmG8H7eNMmhz7vxtcRjTME3S6IwkaS_q0xPftZMQ1ickAIOlH61-Q8Lk8e52PB2S2cdVJsvPUVYg0b0FnRq5HfoQX2fjv3n1vWHlVLnzM9kqLSy8BXBck7tdJ4EL5AYNHAL4W5rjRqK_smq1PnwDU6SI9w.Dfj1kQ.6zIYF2Bw9YqqBtAVtkhDIFSf-AA; __cfduid=d844973ee0835fa0190865a3449ecc30f1551024056; deck_id=43474; _gid=GA1.2.2028602575.1554008286; session=.eJx9UctuwjAQ_Befo8p5OCTcSiXKu6iIKm1VRSbZGIfERrbDU_x7HSRA6qHHmZ2d3Z09o3QLqqYChEFdoxpwEM1rLm4gh5rXMr9DrjOp8pRbBrkxCYMgdjs4coMAeyFBDvqnIlLW8OruVcmMVmDVIFCLGIO83UZLcfV3A99BtWEybTQoQetWu6IbUCaObYekjVl7qTbUtJVy-Hz4mOEJG_mJPy320x1PsBycOpPx6I089EZu7MDuGdEsA61vGA2byP3c97zF7rSazaq6_5rk1PfMbs5gMbb9cNhyBTqlNimXED8k2F74FGLSCQPvUW_DC3EQYewgBYWl1vchUTF4pnqXl8t10rgvGSuir2VZ9t8385AYO8TGu7XXfNsc7Ut4cbTcNTWNfhx0tUnNsZWgHlAFCl0c9Dc0QxUDu6VoquryC0sLmtc.D4MwIA.HfnJ_WxWydCebu1Y2xxsIs9R6Eo Cf-Connecting-Ip: 209.91.110.197 Cdn-Loop: cloudflare X-Forwarded-Host: pennydreadfulmagic.com X-Forwarded-Server: pennydreadfulmagic.com Connection: Keep-Alive ```

DatabaseException Failed to execute ` SELECT d.id, d.finish, d.decklist_hash, cache.active_date, cache.wins, cache.losses, cache.draws, ct.name AS competition_type_name FROM deck AS d LEFT JOIN competition AS c ON d.competition_id = c.id LEFT JOIN competition_series AS cs ON cs.id = c.competition_series_id LEFT JOIN competition_type AS ct ON ct.id = cs.competition_type_id LEFT JOIN deck_cache AS cache ON d.id = cache.deck_id LEFT JOIN ( SELECT `start`.id, `start`.code, `start`.start_date AS start_date, `end`.start_date AS end_date FROM season AS `start` LEFT JOIN season AS `end` ON `end`.id = `start`.id + 1 ) AS season ON season.start_date <= d.created_date AND (season.end_date IS NULL OR season.end_date > d.created_date) WHERE (d.id IN ()) AND (TRUE) GROUP BY d.id, d.competition_id, -- Every deck has only one competition_id but if we want to use competition_id in the HAVING clause we need this. season.id -- In theory this is not necessary as all decks are in a single season and we join on the date but MySQL cannot work that out so give it the hint it needs. HAVING 1 = 1 ORDER BY active_date DESC, d.finish IS NULL, d.finish ` 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 ')) AND (TRUE)\n GROUP BY\n d.id,\n d.competition_id, -' at line 38")` Stack Trace: ``` Python traceback File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 2309, in __call__ return self.wsgi_app(environ, start_response) File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 2295, in wsgi_app response = self.handle_exception(e) File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 2292, in wsgi_app response = self.full_dispatch_request() File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 1815, in full_dispatch_request rv = self.handle_user_exception(e) File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 1718, in handle_user_exception reraise(exc_type, exc_value, tb) File "/home/discord/.local/lib/python3.6/site-packages/flask/_compat.py", line 35, in reraise raise value File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 1813, in full_dispatch_request rv = self.dispatch_request() File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 1799, in dispatch_request return self.view_functions[rule.endpoint](**req.view_args) File "./decksite/main.py", line 279, in matchups results = mus.matchup(hero, enemy, season_id=season_id) if request.args else {} File "./decksite/data/matchup.py", line 51, in matchup results['hero_decks'] = deck.load_decks('d.id IN (' + ', '.join(results['hero_deck_ids']) + ')') File "./decksite/data/deck.py", line 94, in load_decks rows = db().select(sql) File "./shared/database.py", line 41, in select [_, rows] = self.execute_anything(sql, args) File "./shared/database.py", line 60, in execute_anything raise DatabaseException('Failed to execute `{sql}` with `{args}` because of `{e}`'.format(sql=sql, args=args, e=e)) ```

Exception_hash: 1ac391d11ae0cd854fbefe228536953999816739

Labels: decksite; DatabaseException