#πŸ”’ SSL issue discord bot

150 messages Β· Page 1 of 1 (latest)

high oar
#

I cannot run my bot in command prompt.

twin craterBOT
#

@high oar

Python help channel opened

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.

umbral niche
#

send code

#

and any tracebacks

#

!paste

twin craterBOT
#
Pasting large amounts of code

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.

umbral niche
#

!code

twin craterBOT
#
Formatting code on Discord

Here's how to format Python code on Discord:

```py
print('Hello world!')
```

These are backticks, not quotes. Check this out if you can't find the backtick key.

For long code samples, you can use our pastebin.

umbral niche
#

!traceback

twin craterBOT
#
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.

high oar
#
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('')
twin craterBOT
#

Hey @high oar!

Please edit your message to use a code block

Add a py after the three backticks.

```py
print('Hello, world!')
```

This will result in the following:

print('Hello, world!')```
umbral niche
#

please read these embeds carefully then proceed :3

high oar
#
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('')
umbral niche
#

amazing

high oar
#

obviously didnt put my token in

umbral niche
#

any errors?

high oar
#

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

umbral niche
high oar
#

thats my error from command prompt

umbral niche
high oar
#

how do i do such?

umbral niche
#

if your in logo_vscode

high oar
#

yeah

umbral niche
#

open the folder which example_bot.py is in

high oar
#

i am in that folder

umbral niche
#

then open a terminal, and it will automatically be in the folder

high oar
#

this is what i see

umbral niche
#

you can also use cd <path> to change direectories in the terminal

umbral niche
high oar
#

what do you mean?

high oar
#

ohh okay

umbral niche
#

hi grice!

high oar
#

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

umbral niche
sand siren
high oar
umbral niche
high oar
umbral niche
#

im i too mean ;-;

high oar
#

what should i type into vscode terminal?

sand siren
umbral niche
high oar
#

sorry i see people using cmd

umbral niche
#

it can work, but in this case, vscode is better

sand siren
#

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.

high oar
#

what should i type into the terminal

sand siren
#

The same command you've been trying in CMD. py example_bot.py

umbral niche
high oar
#

okay

#

just this

sand siren
#

Have you saved the file?

high oar
#

let me try that

sand siren
#

Python cannot read the content from the editor window in VSC: you must save the changes into the file on disk first.

high oar
#

oh no...

umbral niche
#

i use autosave to get rid of that problem

sand siren
#

New error means progress πŸ™‚

umbral niche
high oar
#

this is a VERY long error message

umbral niche
#

WE ARE HAPPY TO SEE ERROR

umbral niche
sand siren
#

SSL wrong version number? πŸ€” odd

umbral niche
#

@sand siren i have no idea lol

high oar
#

what does that even mean

umbral niche
#

^^^^^^^^

high oar
#

whats SSL kek_kry

umbral niche
#

lemme google

#

secure sockets layer

#

mmmmm ok interesting

high oar
#

wtf is that

#

please dont be something to do with network layer protocols 😭

umbral niche
#

idek

sand siren
#

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

umbral niche
#

grice, how do we even debug

high oar
#

IT IS NETWORK PROTOCOLS 😭

high oar
sand siren
#

What OS version are you using?

high oar
#

Windows 10

umbral niche
#

mmmmmm ok

#

im win10 and its fine

sand siren
#

Are there updates you need to install for Windows?

high oar
#

i think itll make me install windows 11

#

not by the looks of it

sand siren
#

Eh. I have a gaming desktop that's on Win10, the hardware won't permit Win11 for some reason. But it still gets updates.

high oar
#

I have a pretty slow laptop that I just use for fun stuff

sand siren
#

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.

umbral niche
#

i wish thread names would like change, this is no longer help with a very basic bot, its an SSL issue

high oar
#

how do i push an update hahah

umbral niche
#

look in your windows settings app

#

and check for updates

high oar
#

SSL issue discord bot

sand siren
#

Start menu, type "updates", click into the settings for updates and such

umbral niche
#

πŸ‘

sand siren
#

Heck this icon even points to it (bottom right of the screen)

high oar
#

i mean i guess this is something?

#

oooo .net framework

#

Greetings from my phone, laptop is restarting

sand siren
#

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)

sand siren
high oar
#

Uhhh wtf

sand siren
#

Yes

umbral niche
#

gg

high oar
#

I’m terrified

#

Is my computer done for

umbral niche
high oar
#

My BIOS is upgrading

sand siren
#

Ah you're fine, like I saw you got a firmware update via MS Update.

high oar
umbral niche
high oar
#

jesus i thought i had a virus

sand siren
#

Not yet πŸ˜‰ /s

high oar
#

i’ve installed many sketchy minecraft mods in my time

#

thought malwarebytes would’ve saved me

umbral niche
high oar
#

clearly not Kek_Party_Hard

#

this has never happened on my laptop EVER

#

maybe it’ll stop running like crap now?

sand siren
#

That firmware update was released Aug 2023, btw

high oar
#

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

sand siren
#

Alrighty, let's see if the thing works any differently now

high oar
#

what code did i need to write again to run it lmao

#

oh for fuck sake

sand siren
#

New round of updates?

high oar
#

there was one update

#

still not fixed

sand siren
#

Out of curiosity, can you run py -m pip show urllib3?

sand siren
#

Probably not the reason, then πŸ€”

high oar
#

i just dont know what to do

#

why has everything got to be so difficult

sand siren
#

It's a unique problem, so it's hard to say.

#

How did you install Python on this machine? Download from python.org?

high oar
#

But it might be overlapping with python from microsoft store

#

i uninstalled my microsoft store version

high oar
#

I've put up a reddit post, ill see what happens

lean pasture
high oar
#

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

twin craterBOT
#
Python help channel closed for inactivity

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.