#๐ I'm confused on what these errors are about.
49 messages ยท Page 1 of 1 (latest)
@marble wing
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.
show the error codes
i try but its so long it autos into files
!paste
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.
you can paste it in there and then send the link
try
pip3 install audioop-lts
its already installed
You probably want just import audioop as the -lts PyPI version is a drop in replacement.
As mentioned here: https://pypi.org/project/audioop-lts/
"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."
python 3.13 removed audioop from the standard library
i have answered this question so many times in the last few days
I'll bet !!
Here's the list: https://peps.python.org/pep-0594/#id4
... link goes directly to the list.
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)')]
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.
that's weird? everything was fine until i tried to update and reinstall things
Yeah. I assume something's happened to the certificate store. I'm not sure how to debug that.
is it because of the new python 3.13?
Likely.
Just for the experiment, try installing truststore.
Then in your code at the top:
import truststore
truststore.inject_into_ssl()
and retry things.
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).
do i have to download truststore?
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.
Alas. And you've got this up the top?
import truststore
truststore.inject_into_ssl()
?
yes
Hmm. Then I'm at a bit of a loss.
This might be of some help: https://stackoverflow.com/questions/64776601/discord-py-ssl-sslcertverificationerror-ssl-certificate-verify-failed
TLDR: I've been trying to use discord.py on my mac for a while, but everything I've tried doesnt work. All the other solutions dont work!
Please help. I've been trying to get Discord.py to work for
ok so that actually fixed connecting to the bot (tysm) but i cant used the command without errors
Hmm. Get rid of the truststore lines and retry.
ah that did it, tysm!!
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.
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.