Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError: module 'ssl' has no attribute 'wrap_socket' with Python 3.12 #301

Open
Talkless opened this issue Jul 24, 2024 · 2 comments

Comments

@Talkless
Copy link
Contributor

It seems eps cannot work with Python 3.12 (on Debian Sid), and I cannot use Python 3.11 because python3.11-venv refuses to install.

Error happens when Electrum tries to connect:

[ 5533.218809] eps[56274]: Traceback (most recent call last):
[ 5533.218809] eps[56274]:   File "/opt/python3_venv_eps/bin/electrum-personal-server", line 8, in <module>
[ 5533.219155] eps[56274]:     sys.exit(main())
[ 5533.219155] eps[56274]:              ^^^^^^
[ 5533.219155] eps[56274]:   File "/opt/python3_venv_eps/lib/python3.12/site-packages/electrumpersonalserver/server/common.py", line 494, in main
[ 5533.219155] eps[56274]:     run_electrum_server(rpc, txmonitor, config)
[ 5533.219236] eps[56274]:   File "/opt/python3_venv_eps/lib/python3.12/site-packages/electrumpersonalserver/server/common.py", line 147, in run_electrum_server
[ 5533.219269] eps[56274]:     sock = ssl.wrap_socket(sock, server_side=True,
[ 5533.219304] eps[56274]:            ^^^^^^^^^^^^^^^
[ 5533.219365] eps[56274]: AttributeError: module 'ssl' has no attribute 'wrap_socket'
@Talkless
Copy link
Contributor Author

Used pyenv to build local Python 3.11 and it works with it.

@Talkless Talkless changed the title AttributeError: module 'ssl' has no attribute 'wrap_socket' AttributeError: module 'ssl' has no attribute 'wrap_socket' with Python 3.12 Jul 24, 2024
@editor-Ajian
Copy link

I have the same problem. The source seems like this: python 3.12 remove the ssl.wrap_socket() function: https://docs.python.org/3.12/whatsnew/3.12.html#ssl

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants