#π SSL issue discord bot
150 messages Β· Page 1 of 1 (latest)
@high oar
Remember to:
- Ask your Python question, not if you can ask or if there's an expert who can help.
- Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
- Explain what you expect to happen and what actually happens.
:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.
If your code is too long to fit in a codeblock in Discord, you can paste your code here:
https://paste.pythondiscord.com/
After pasting your code, save it by clicking the Paste! button in the bottom left, or by pressing CTRL + S. After doing that, you will be navigated to the new paste's page. Copy the URL and post it here so others can see it.
!code
!traceback
Please provide the full traceback for your exception in order to help us identify your issue.
While the last line of the error message tells us what kind of error you got,
the full traceback will tell us which line, and other critical information to solve your problem.
Please avoid screenshots so we can copy and paste parts of the message.
A full traceback could look like:
Traceback (most recent call last):
File "my_file.py", line 5, in <module>
add_three("6")
File "my_file.py", line 2, in add_three
a = num + 3
~~~~^~~
TypeError: can only concatenate str (not "int") to str
If the traceback is long, use our pastebin.
import discord
class MyClient(discord.Client):
async def on_ready(self):
print(f'Logged on as {self.user}!')
async def on_message(self, message):
print(f'Message from {message.author}: {message.content}')
intents = discord.Intents.default()
intents.message_content = True
client = MyClient(intents=intents)
client.run('')
Hey @high oar!
Add a py after the three backticks.
```py
print('Hello, world!')
```
This will result in the following:
print('Hello, world!')```
please read these embeds carefully then proceed :3
import discord
class MyClient(discord.Client):
async def on_ready(self):
print(f'Logged on as {self.user}!')
async def on_message(self, message):
print(f'Message from {message.author}: {message.content}')
intents = discord.Intents.default()
intents.message_content = True
client = MyClient(intents=intents)
client.run('')
amazing
obviously didnt put my token in
any errors?
C:\Users\georg>py -3 example_bot.py
C:\Users\georg\AppData\Local\Programs\Python\Python313\python.exe: can't open file 'C:\Users\georg\example_bot.py': [Errno 2] No such file or directory
you should use a different file to store you token but lets not discuss that right now
thats my error from command prompt
first, navigate to the directory
how do i do such?
if your in 
yeah
open the folder which example_bot.py is in
i am in that folder
then open a terminal, and it will automatically be in the folder
this is what i see
you can also use cd <path> to change direectories in the terminal
aight, try again
what do you mean?
do this again
ohh okay
hi grice!
C:\Users\georg>py -3 example_bot.py
C:\Users\georg\AppData\Local\Programs\Python\Python313\python.exe: can't open file 'C:\Users\georg\example_bot.py': [Errno 2] No such file or directory
the terminal is in the wrong directory... mmm, can you send a screenshot of the error?
When you call py example_bot.py, it's looking for the file example_bot.py in the directory shown to the left of the prompt, C:\Users\georg.
But, the file is not located in that directory.
From your screenshot, if looks like the terminal is opening in E:\DiscordBot, and I'd guess the file is located there, instead?
My DiscordBot is my fresh file containing the venv and Example_bot.py
im i too mean ;-;
what should i type into vscode terminal?
Right. So use the integrated terminal in VS Code to call the command, not a separate terminal window. π
here, in the "PS E\...." type out the py launching command
sorry i see people using cmd
it can work, but in this case, vscode is better
VSC's integrated terminal just wraps around either PowerShell or CMD (or any other terminal on the machine, like bash, zsh, etc.). It's not a different terminal program.
what should i type into the terminal
The same command you've been trying in CMD. py example_bot.py
the same thing as before!
Have you saved the file?
let me try that
Python cannot read the content from the editor window in VSC: you must save the changes into the file on disk first.
oh no...
i use autosave to get rid of that problem
New error means progress π
EXACTLY
this is a VERY long error message
WE ARE HAPPY TO SEE ERROR
average discord.py error traceback
SSL wrong version number? π€ odd
@sand siren i have no idea lol
what does that even mean
^^^^^^^^
whats SSL 
idek
SSL or rather TLS is an encryption layer for web traffic. You may be used to accessing websites at https://: the s stands for "secure", which implies TLS/SSL
Anyway, reference: https://github.com/aio-libs/aiohttp/issues/3829
Something on your machine seems to be out of date?
grice, how do we even debug
IT IS NETWORK PROTOCOLS π
oh jesus what do i even need to do to fix this
What OS version are you using?
Windows 10
Are there updates you need to install for Windows?
Eh. I have a gaming desktop that's on Win10, the hardware won't permit Win11 for some reason. But it still gets updates.
I have a pretty slow laptop that I just use for fun stuff
Well, you're on Python 3.13, Win 10, the code you're running doesn't look too crazy... I really think it's just down to the machine's updates, if you're able to install latest without pushing to Win11 if you're trying to avoid it.
i wish thread names would like change, this is no longer help with a very basic bot, its an SSL issue
how do i push an update hahah
SSL issue discord bot
Start menu, type "updates", click into the settings for updates and such
π
Heck this icon even points to it (bottom right of the screen)
i mean i guess this is something?
oooo .net framework
Greetings from my phone, laptop is restarting
firmware too, oy.
You should iterate on the update process for a bit. Install, restart, check again (they're annoying about that, you don't always get everything in one check)
Hopefully with that settled, you might be able to just start up the bot without issue.
The error itself pointed to here (link to issue in the one I'm replying to), and they suggest it's from a low level, the ssl module in Python; but even that depends on the certificates on your machine.
Yes
gg
C shawp :3
My BIOS is upgrading
Ah you're fine, like I saw you got a firmware update via MS Update.
what does this mean
"homework" folder... gone
jesus i thought i had a virus
Not yet π /s
iβve installed many sketchy minecraft mods in my time
thought malwarebytes wouldβve saved me
remove sarcasm, be truth
clearly not 
this has never happened on my laptop EVER
maybe itβll stop running like crap now?
That firmware update was released Aug 2023, btw
Jesus christ
Pretty sure I reverted from Windows 11 to Windows 10 in 2024 so I donβt know how I missed that
Okay we back on laptop
Alrighty, let's see if the thing works any differently now
New round of updates?
apparently so
there was one update
still not fixed
Out of curiosity, can you run py -m pip show urllib3?
Probably not the reason, then π€
It's a unique problem, so it's hard to say.
How did you install Python on this machine? Download from python.org?
Yeah
But it might be overlapping with python from microsoft store
i uninstalled my microsoft store version
I've put up a reddit post, ill see what happens
The bot runs with venv (see right bottom in vsc), but the venv is not activated in the powershell, hence pip doesn't see urllib3
Ill hire an SSL expert instead π
Iβm so stumped on what to do
Might buy a new laptop at some point anyway, something more beefy
This help channel has been closed. Feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.