Reputation: 19
Whenever I try to run my code with discord.py
package i get some nested asn1 error. Here is my code:
import discord
from discord.ext import commands
client = commands.Bot(command_prefix = "epic")
@client.event
async def on_ready():
print("Bot is ready!")
client.run('NzcxMDIxMjQyNDk2MzE5NTQ4.X5mDfQ.chrdyrxO6OBcQOPRKTIhw05eeAc')
Also, here is the error i get:
Message=[ASN1] nested asn1 error (_ssl.c:4145)
Source=C:\Users\Vesna\source\repos\DiscordBot\DiscordBot\DiscordBot.py StackTrace: File "C:\Users\Vesna\source\repos\DiscordBot\DiscordBot\DiscordBot.py", line 10, in client.run('NzcxMDIxMjQyNDk2MzE5NTQ4.X5mDfQ.chrdyrxO6OBcQOPRKTIhw05eeAc')
Upvotes: 0
Views: 1492
Reputation: 914
That nested asn1 error (_ssl.c:4145) indicates there is an issue communicating with the server. More than likely, you have a bad CA Root certificate.
You may also inspect the certificate chain with: openssl s_client -showcerts -connect discordapp.com:443
You may also want to regenerate that bot token within the Discord Application interface, as sharing it could allow others to use your bot.
Upvotes: 1