PennyDreadfulMTG / perf-reports

2 stars 2 forks source link

500 error at /seasons/1/cards/Disowned Ancestor/ #50347

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 (SELECT deck_id FROM deck_card WHERE card = 'Disowned Ancestor')) AND (season.id = 1)
    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 `(1146, "Table 'decksite.deck_card' doesn't exist")`

Reported on decksite by logged_out


Request Data ``` Request Method: GET Path: /seasons/1/cards/Disowned Ancestor/? Cookies: {} Endpoint: seasons.card View Args: {'name': 'Disowned Ancestor'} Person: logged_out Referrer: None Request Data: {} Host: pennydreadfulmagic.com Accept-Encoding: gzip Cf-Ipcountry: DE X-Forwarded-For: 148.251.69.139, 162.158.93.59 Cf-Ray: 4ec8abbb3fe4d6b9-FRA X-Forwarded-Proto: https Cf-Visitor: {"scheme":"https"} Accept: text/html,text/plain,text/xml,text/*,application/xml,application/xhtml+xml,application/rss+xml,application/atom+xml,application/rdf+xml,application/php,application/x-php,application/x-httpd-php User-Agent: Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/) Accept-Language: en Cf-Connecting-Ip: 148.251.69.139 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 (SELECT deck_id FROM deck_card WHERE card = 'Disowned Ancestor')) AND (season.id = 1) 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 `(1146, "Table 'decksite.deck_card' doesn't exist")` Stack Trace: ```Python traceback File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 2328, in __call__ return self.wsgi_app(environ, start_response) File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 2314, in wsgi_app response = self.handle_exception(e) File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 2311, in wsgi_app response = self.full_dispatch_request() File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 1834, in full_dispatch_request rv = self.handle_user_exception(e) File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 1737, in handle_user_exception reraise(exc_type, exc_value, tb) File "/home/discord/.local/lib/python3.6/site-packages/flask/_compat.py", line 36, in reraise raise value File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 1832, in full_dispatch_request rv = self.dispatch_request() File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 1818, in dispatch_request return self.view_functions[rule.endpoint](**req.view_args) File "./decksite/cache.py", line 79, in decorated_function response = make_response(f(*args, **kwargs)) File "./decksite/main.py", line 162, in card c = cs.load_card(oracle.valid_name(urllib.parse.unquote_plus(name)), season_id=get_season_id()) File "./decksite/data/card.py", line 70, in load_card c.decks = deck.load_decks('d.id IN (SELECT deck_id FROM deck_card WHERE card = {name})'.format(name=sqlescape(name)), season_id=season_id) File "./decksite/data/deck.py", line 95, 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: 9db0b2bf8162e4659572db3555d0f6780aa75c12

vorpal-buildbot commented 5 years ago

500 error at /seasons/1/cards/Ember Swallower/

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 (SELECT deck_id FROM deck_card WHERE card = 'Ember Swallower')) AND (season.id = 1)
    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 `(1146, "Table 'decksite.deck_card' doesn't exist")`

Reported on decksite by logged_out


Request Data ``` Request Method: GET Path: /seasons/1/cards/Ember Swallower/? Cookies: {} Endpoint: seasons.card View Args: {'name': 'Ember Swallower'} Person: logged_out Referrer: None Request Data: {} Host: pennydreadfulmagic.com Accept-Encoding: gzip Cf-Ipcountry: DE X-Forwarded-For: 148.251.69.139, 162.158.93.59 Cf-Ray: 4ec8abefdfffd6b9-FRA X-Forwarded-Proto: https Cf-Visitor: {"scheme":"https"} Accept: text/html,text/plain,text/xml,text/*,application/xml,application/xhtml+xml,application/rss+xml,application/atom+xml,application/rdf+xml,application/php,application/x-php,application/x-httpd-php User-Agent: Mozilla/5.0 (compatible; MJ12bot/v1.4.8; http://mj12bot.com/) Accept-Language: en Cf-Connecting-Ip: 148.251.69.139 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 (SELECT deck_id FROM deck_card WHERE card = 'Ember Swallower')) AND (season.id = 1) 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 `(1146, "Table 'decksite.deck_card' doesn't exist")` Stack Trace: ```Python traceback File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 2328, in __call__ return self.wsgi_app(environ, start_response) File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 2314, in wsgi_app response = self.handle_exception(e) File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 2311, in wsgi_app response = self.full_dispatch_request() File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 1834, in full_dispatch_request rv = self.handle_user_exception(e) File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 1737, in handle_user_exception reraise(exc_type, exc_value, tb) File "/home/discord/.local/lib/python3.6/site-packages/flask/_compat.py", line 36, in reraise raise value File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 1832, in full_dispatch_request rv = self.dispatch_request() File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 1818, in dispatch_request return self.view_functions[rule.endpoint](**req.view_args) File "./decksite/cache.py", line 79, in decorated_function response = make_response(f(*args, **kwargs)) File "./decksite/main.py", line 162, in card c = cs.load_card(oracle.valid_name(urllib.parse.unquote_plus(name)), season_id=get_season_id()) File "./decksite/data/card.py", line 70, in load_card c.decks = deck.load_decks('d.id IN (SELECT deck_id FROM deck_card WHERE card = {name})'.format(name=sqlescape(name)), season_id=season_id) File "./decksite/data/deck.py", line 95, 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: 9db0b2bf8162e4659572db3555d0f6780aa75c12

Labels: decksite; DatabaseException

vorpal-buildbot commented 5 years ago

500 error at /seasons/5/cards/In the Web of War/

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 (SELECT deck_id FROM deck_card WHERE card = 'In the Web of War')) AND (season.id = 5)
    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 `(1146, "Table 'decksite.deck_card' doesn't exist")`

Reported on decksite by logged_out


Request Data ``` Request Method: GET Path: /seasons/5/cards/In the Web of War/? Cookies: {} Endpoint: seasons.card View Args: {'name': 'In the Web of War'} Person: logged_out Referrer: None Request Data: {} Host: pennydreadfulmagic.com Accept-Encoding: gzip Cf-Ipcountry: US X-Forwarded-For: 46.229.168.138, 172.69.62.162 Cf-Ray: 4ec8b541ae4fcec8-IAD X-Forwarded-Proto: https Cf-Visitor: {"scheme":"https"} Accept: text/html, application/rss+xml, application/atom+xml, text/xml, text/rss+xml User-Agent: Mozilla/5.0 (compatible; SemrushBot/3~bl; +http://www.semrush.com/bot.html) Cf-Connecting-Ip: 46.229.168.138 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 (SELECT deck_id FROM deck_card WHERE card = 'In the Web of War')) AND (season.id = 5) 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 `(1146, "Table 'decksite.deck_card' doesn't exist")` Stack Trace: ```Python traceback File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 2328, in __call__ return self.wsgi_app(environ, start_response) File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 2314, in wsgi_app response = self.handle_exception(e) File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 2311, in wsgi_app response = self.full_dispatch_request() File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 1834, in full_dispatch_request rv = self.handle_user_exception(e) File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 1737, in handle_user_exception reraise(exc_type, exc_value, tb) File "/home/discord/.local/lib/python3.6/site-packages/flask/_compat.py", line 36, in reraise raise value File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 1832, in full_dispatch_request rv = self.dispatch_request() File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 1818, in dispatch_request return self.view_functions[rule.endpoint](**req.view_args) File "./decksite/cache.py", line 79, in decorated_function response = make_response(f(*args, **kwargs)) File "./decksite/main.py", line 162, in card c = cs.load_card(oracle.valid_name(urllib.parse.unquote_plus(name)), season_id=get_season_id()) File "./decksite/data/card.py", line 70, in load_card c.decks = deck.load_decks('d.id IN (SELECT deck_id FROM deck_card WHERE card = {name})'.format(name=sqlescape(name)), season_id=season_id) File "./decksite/data/deck.py", line 95, 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: 9db0b2bf8162e4659572db3555d0f6780aa75c12

Labels: decksite; DatabaseException

vorpal-buildbot commented 5 years ago

500 error at /cards/Viridian Harvest/

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 (SELECT deck_id FROM deck_card WHERE card = 'Viridian Harvest')) AND (season.id = 12)
    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 `(1146, "Table 'decksite.deck_card' doesn't exist")`

Reported on decksite by logged_out


Request Data ``` Request Method: GET Path: /cards/Viridian Harvest/?locale=it Cookies: {} Endpoint: card View Args: {'name': 'Viridian Harvest'} Person: logged_out Referrer: None Request Data: {} Host: pennydreadfulmagic.com Accept-Encoding: gzip Cf-Ipcountry: US X-Forwarded-For: 157.55.39.252, 108.162.245.6 Cf-Ray: 4ec8b542be0e2a89-SEA X-Forwarded-Proto: https Cf-Visitor: {"scheme":"https"} Cache-Control: no-cache Pragma: no-cache Accept: */* User-Agent: Mozilla/5.0 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm) Cf-Connecting-Ip: 157.55.39.252 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 (SELECT deck_id FROM deck_card WHERE card = 'Viridian Harvest')) AND (season.id = 12) 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 `(1146, "Table 'decksite.deck_card' doesn't exist")` Stack Trace: ```Python traceback File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 2328, in __call__ return self.wsgi_app(environ, start_response) File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 2314, in wsgi_app response = self.handle_exception(e) File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 2311, in wsgi_app response = self.full_dispatch_request() File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 1834, in full_dispatch_request rv = self.handle_user_exception(e) File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 1737, in handle_user_exception reraise(exc_type, exc_value, tb) File "/home/discord/.local/lib/python3.6/site-packages/flask/_compat.py", line 36, in reraise raise value File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 1832, in full_dispatch_request rv = self.dispatch_request() File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 1818, in dispatch_request return self.view_functions[rule.endpoint](**req.view_args) File "./decksite/cache.py", line 79, in decorated_function response = make_response(f(*args, **kwargs)) File "./decksite/main.py", line 162, in card c = cs.load_card(oracle.valid_name(urllib.parse.unquote_plus(name)), season_id=get_season_id()) File "./decksite/data/card.py", line 70, in load_card c.decks = deck.load_decks('d.id IN (SELECT deck_id FROM deck_card WHERE card = {name})'.format(name=sqlescape(name)), season_id=season_id) File "./decksite/data/deck.py", line 95, 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: 9db0b2bf8162e4659572db3555d0f6780aa75c12

Labels: Search Engine; decksite; DatabaseException

vorpal-buildbot commented 5 years ago

500 error at /cards/Mizzium Mortars/

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 (SELECT deck_id FROM deck_card WHERE card = 'Mizzium Mortars')) AND (season.id = 12)
    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 `(1146, "Table 'decksite.deck_card' doesn't exist")`

Reported on decksite by logged_out


Request Data ``` Request Method: GET Path: /cards/Mizzium Mortars/? Cookies: {} Endpoint: card View Args: {'name': 'Mizzium Mortars'} Person: logged_out Referrer: None Request Data: {} Host: pennydreadfulmagic.com Accept-Encoding: gzip Cf-Ipcountry: FR X-Forwarded-For: 54.36.149.46, 172.69.55.30 Cf-Ray: 4ec8b57a6f6472e7-AMS X-Forwarded-Proto: https Cf-Visitor: {"scheme":"https"} User-Agent: Mozilla/5.0 (compatible; AhrefsBot/6.1; +http://ahrefs.com/robot/) Accept: */* Cf-Connecting-Ip: 54.36.149.46 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 (SELECT deck_id FROM deck_card WHERE card = 'Mizzium Mortars')) AND (season.id = 12) 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 `(1146, "Table 'decksite.deck_card' doesn't exist")` Stack Trace: ```Python traceback File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 2328, in __call__ return self.wsgi_app(environ, start_response) File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 2314, in wsgi_app response = self.handle_exception(e) File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 2311, in wsgi_app response = self.full_dispatch_request() File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 1834, in full_dispatch_request rv = self.handle_user_exception(e) File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 1737, in handle_user_exception reraise(exc_type, exc_value, tb) File "/home/discord/.local/lib/python3.6/site-packages/flask/_compat.py", line 36, in reraise raise value File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 1832, in full_dispatch_request rv = self.dispatch_request() File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 1818, in dispatch_request return self.view_functions[rule.endpoint](**req.view_args) File "./decksite/cache.py", line 79, in decorated_function response = make_response(f(*args, **kwargs)) File "./decksite/main.py", line 162, in card c = cs.load_card(oracle.valid_name(urllib.parse.unquote_plus(name)), season_id=get_season_id()) File "./decksite/data/card.py", line 70, in load_card c.decks = deck.load_decks('d.id IN (SELECT deck_id FROM deck_card WHERE card = {name})'.format(name=sqlescape(name)), season_id=season_id) File "./decksite/data/deck.py", line 95, 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: 9db0b2bf8162e4659572db3555d0f6780aa75c12

Labels: decksite; DatabaseException

vorpal-buildbot commented 5 years ago

500 error at /cards/Hijack/

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 (SELECT deck_id FROM deck_card WHERE card = 'Hijack')) AND (season.id = 12)
    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 `(1146, "Table 'decksite.deck_card' doesn't exist")`

Reported on decksite by logged_out


Request Data ``` Request Method: GET Path: /cards/Hijack/? Cookies: {} Endpoint: card View Args: {'name': 'Hijack'} Person: logged_out Referrer: None Request Data: {} Host: pennydreadfulmagic.com Accept-Encoding: gzip Cf-Ipcountry: US X-Forwarded-For: 157.55.39.231, 162.158.107.21 Cf-Ray: 4ec8b6c4bf5679dd-SEA X-Forwarded-Proto: https Cf-Visitor: {"scheme":"https"} Cache-Control: no-cache Pragma: no-cache Accept: */* From: bingbot(at)microsoft.com User-Agent: Mozilla/5.0 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm) Cf-Connecting-Ip: 157.55.39.231 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 (SELECT deck_id FROM deck_card WHERE card = 'Hijack')) AND (season.id = 12) 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 `(1146, "Table 'decksite.deck_card' doesn't exist")` Stack Trace: ```Python traceback File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 2328, in __call__ return self.wsgi_app(environ, start_response) File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 2314, in wsgi_app response = self.handle_exception(e) File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 2311, in wsgi_app response = self.full_dispatch_request() File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 1834, in full_dispatch_request rv = self.handle_user_exception(e) File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 1737, in handle_user_exception reraise(exc_type, exc_value, tb) File "/home/discord/.local/lib/python3.6/site-packages/flask/_compat.py", line 36, in reraise raise value File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 1832, in full_dispatch_request rv = self.dispatch_request() File "/home/discord/.local/lib/python3.6/site-packages/flask/app.py", line 1818, in dispatch_request return self.view_functions[rule.endpoint](**req.view_args) File "./decksite/cache.py", line 79, in decorated_function response = make_response(f(*args, **kwargs)) File "./decksite/main.py", line 162, in card c = cs.load_card(oracle.valid_name(urllib.parse.unquote_plus(name)), season_id=get_season_id()) File "./decksite/data/card.py", line 70, in load_card c.decks = deck.load_decks('d.id IN (SELECT deck_id FROM deck_card WHERE card = {name})'.format(name=sqlescape(name)), season_id=season_id) File "./decksite/data/deck.py", line 95, 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: 9db0b2bf8162e4659572db3555d0f6780aa75c12

Labels: Search Engine; decksite; DatabaseException