chris-belcher / electrum-personal-server

Maximally lightweight electrum server for a single user
MIT License
598 stars 110 forks source link

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

Open Talkless opened 1 month ago

Talkless commented 1 month ago

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 commented 1 month ago

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