#๐Ÿ”’ I'm confused on what these errors are about.

49 messages ยท Page 1 of 1 (latest)

formal karmaBOT
#

@marble wing

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.

pseudo cape
#

show the error codes

marble wing
#

it wont let me send

#

hold on

pseudo cape
#

you cant paste files here

#

just paste it as text

marble wing
#

i try but its so long it autos into files

pseudo cape
#

!paste

formal karmaBOT
#
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.

pseudo cape
#

you can paste it in there and then send the link

marble wing
#

got it

pseudo cape
#

try
pip3 install audioop-lts

marble wing
#

its already installed

pseudo cape
#

have you tried importing it

#
import audioop-lts```
marble wing
#

it says the "-" is invalid syntax

#

is it just audioop?

stone laurel
#

You probably want just import audioop as the -lts PyPI version is a drop in replacement.

#

"An LTS port of the Python builtin module audioop which was deprecated since version 3.11 and removed in 3.13.

This project exists to maintain this module for future versions."

pseudo cape
#

python 3.13 removed audioop from the standard library
i have answered this question so many times in the last few days

stone laurel
#

... link goes directly to the list.

marble wing
#

came out good thank you but, is this part a cause for concern?, File "/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/site-packages/aiohttp/connector.py", line 1100, in _wrap_create_connection raise ClientConnectorCertificateError(req.connection_key, exc) from exc aiohttp.client_exceptions.ClientConnectorCertificateError: Cannot connect to host discord.com:443 ssl:True [SSLCertVerificationError: (1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1020)')]

stone laurel
#

Yes, this is a bit surprising. This says that the discord package cannot verify its connection to discord.com. This is an issue with SSL certificates and the local store of authoritative root certificates (I believe). I'd expect that to be up to date.

marble wing
#

that's weird? everything was fine until i tried to update and reinstall things

stone laurel
#

Yeah. I assume something's happened to the certificate store. I'm not sure how to debug that.

marble wing
#

is it because of the new python 3.13?

stone laurel
#

Likely.

#

Just for the experiment, try installing truststore.

Then in your code at the top:

import truststore
truststore.inject_into_ssl()

and retry things.

See: https://pypi.org/project/truststore/

#

I seem to recall that Python started shipping with its own certificate store at some recent point (to work on systems whose own stores were out of date).

marble wing
#

do i have to download truststore?

stone laurel
#

Yes, python3 -m pip install truststore, the same way you installed audioop-tls.

#

Note: I have never used truststore myself. You should probably consider this an experiment.

marble wing
stone laurel
#

Alas. And you've got this up the top?

import truststore
truststore.inject_into_ssl()

?

marble wing
#

yes

stone laurel
#

Hmm. Then I'm at a bit of a loss.

marble wing
#

ok so that actually fixed connecting to the bot (tysm) but i cant used the command without errors

stone laurel
#

Hmm. Get rid of the truststore lines and retry.

marble wing
#

ah that did it, tysm!!

stone laurel
#

Yay! You've successfully installed current certificates, and avoided truststore which is something of a workaround.

#

I think what you've done here is:

  • modern python uses its own cert store by default, so as not to be dependent on out-of-dates cert stores on random user machines
  • you need to install current certs in its cert store
#

which you've now done.

formal karmaBOT
#
Python help channel closed

This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, 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.