Reputation: 321
I'm making a discord Music Bot in python and everything works fine when I run the bot on my pc, but when I run it via Replit.com it returns an error.
Traceback (most recent call last):
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/ext/commands/bot.py", line 939, in invoke
await ctx.command.invoke(ctx)
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/ext/commands/core.py", line 863, in invoke
await injected(*ctx.args, **ctx.kwargs)
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/ext/commands/core.py", line 94, in wrapped
raise CommandInvokeError(exc) from exc
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: KeyError: 'dislike_count'
I know this error occurs because of a line in a DiscordUtils file dislikes = data['dislike_count']
, so on my pc I can just comment that line out and everything works fine.
But on Replit.com there seems to be no way to change or modify installed library files, so how should I fix this issue? I also tried Heroku, but that is the same issue.
I hope someone can help me out, thanks in advance!
Upvotes: 2
Views: 2239
Reputation: 7
Find where you have pip installed your DiscordUtils, in the DiscordUtils folder you will find music.py. Open the file in a code editor and delete all of the strings in line 51, 67 and 87. This will fix the problem if you still have it.
Upvotes: 1