staciax / valorant-discord-bot

A discord bot with valorant api.
GNU General Public License v3.0
338 stars 201 forks source link

I'm confused #72

Closed CoolioTT closed 2 years ago

CoolioTT commented 2 years ago

Task exception was never retrieved future: <Task finished name='CommandTree-invoker' coro=<CommandTree._from_interaction..wrapper() done, defined at /home/store/.local/lib/python3.9/site-packages/discord/app_commands/tree.py:935> exception=TypeError('Subscripted generics cannot be used with class and instance checks')> Traceback (most recent call last): File "/home/store/.local/lib/python3.9/site-packages/discord/app_commands/commands.py", line 640, in _do_call return await self._callback(self.binding, interaction, **params) # type: ignore File "/home/store/valorant discord bot/cogs/valorant.py", line 149, in store self.db.insert_skin_price(skin_price) File "/home/store/valorant discord bot/utils/valorant/db.py", line 203, in insert_skin_price cache = self.read_cache() File "/home/store/valorant discord bot/utils/valorant/db.py", line 35, in read_cache data = JSON.read('cache') File "/home/store/valorant discord bot/utils/valorant/useful.py", line 106, in read data = json.load(json_file) File "/usr/lib/python3.9/json/init.py", line 293, in load return loads(fp.read(), File "/usr/lib/python3.9/json/init.py", line 346, in loads return _default_decoder.decode(s) File "/usr/lib/python3.9/json/decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/usr/lib/python3.9/json/decoder.py", line 353, in raw_decode obj, end = self.scan_once(s, idx) json.decoder.JSONDecodeError: Unterminated string starting at: line 59595 column 19 (char 2233305)

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

Traceback (most recent call last): File "/home/store/.local/lib/python3.9/site-packages/discord/app_commands/tree.py", line 1104, in call await command._invoke_with_namespace(interaction, namespace) File "/home/store/.local/lib/python3.9/site-packages/discord/app_commands/commands.py", line 666, in _invoke_with_namespace return await self._do_call(interaction, transformed_values) File "/home/store/.local/lib/python3.9/site-packages/discord/app_commands/commands.py", line 659, in _do_call raise CommandInvokeError(self, e) from e discord.app_commands.errors.CommandInvokeError: Command 'store' raised an exception: JSONDecodeError: Unterminated string starting at: line 59595 column 19 (char 2233305)

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/home/store/.local/lib/python3.9/site-packages/discord/app_commands/tree.py", line 937, in wrapper await self.call(interaction) File "/home/store/.local/lib/python3.9/site-packages/discord/app_commands/tree.py", line 1107, in call await self.on_error(interaction, e) File "/home/store/valorant discord bot/cogs/errors.py", line 47, in on_app_command_error elif isinstance(error, Union[AppCommandNotFound, MissingPermissions, BotMissingPermissions]): File "/usr/lib/python3.9/typing.py", line 715, in instancecheck return self.subclasscheck(type(obj)) File "/usr/lib/python3.9/typing.py", line 718, in subclasscheck raise TypeError("Subscripted generics cannot be used with" TypeError: Subscripted generics cannot be used with class and instance checks

staciax commented 2 years ago

try delete folder data then try again

CoolioTT commented 2 years ago

worked thanks