Videonauth / ProtonDB-Bot

MIT License
4 stars 0 forks source link

[Bug] Json decode error on search. #22

Closed Videonauth closed 4 years ago

Videonauth commented 5 years ago
2019-05-18 22:37:14,199 INFO: context.author = fahri.uzun#3612
2019-05-18 22:37:14,199 DEBUG: context.message.author.mention = <@407422305007042581>
2019-05-18 22:37:14,199 DEBUG: context.message.author.id = 407422305007042581
2019-05-18 22:37:14,199 INFO: context.guild = ProtonDB Official Server
2019-05-18 22:37:14,199 INFO: context.channel = protondb-search
2019-05-18 22:37:14,199 DEBUG: context.message.content = !search quake champions
2019-05-18 22:37:14,199 INFO: search_text = quake champions
Ignoring exception in on_command_error
Traceback (most recent call last):
  File "/home/michael/ProtonDB-Bot/lib/python3.7/site-packages/discord/ext/commands/core.py", line 63, in wrapped
    ret = await coro(*args, **kwargs)
  File "/home/michael/ProtonDB-Bot/extensions-enabled/search.py", line 138, in search
    _game = _steam_client.getApp(appid=_search_result)
  File "/home/michael/ProtonDB-Bot/lib/python3.7/site-packages/steamfront/client.py", line 79, in getApp
    return _App(appid)
  File "/home/michael/ProtonDB-Bot/lib/python3.7/site-packages/steamfront/app.py", line 53, in __init__
    rawdata = site.json()
  File "/home/michael/ProtonDB-Bot/lib/python3.7/site-packages/requests/models.py", line 897, in json
    return complexjson.loads(self.text, **kwargs)
  File "/usr/lib/python3.7/json/__init__.py", line 348, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python3.7/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python3.7/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/michael/ProtonDB-Bot/lib/python3.7/site-packages/discord/client.py", line 255, in _run_event
    await coro(*args, **kwargs)
  File "./bot.py", line 329, in on_command_error
    raise error
  File "/home/michael/ProtonDB-Bot/lib/python3.7/site-packages/discord/ext/commands/bot.py", line 860, in invoke
    await ctx.command.invoke(ctx)
  File "/home/michael/ProtonDB-Bot/lib/python3.7/site-packages/discord/ext/commands/core.py", line 698, in invoke
    await injected(*ctx.args, **ctx.kwargs)
  File "/home/michael/ProtonDB-Bot/lib/python3.7/site-packages/discord/ext/commands/core.py", line 72, in wrapped
    raise CommandInvokeError(exc) from exc
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Videonauth commented 4 years ago

This is likely to be an obsolete issue after the complete rework of the search function.