chia-blockchain: [BUG] Chia does not work with python 3.10

Describe the bug

After a routine OS upgrade from Python 3.9 to 3.10, chia start node fails to start the node. While the chia_daemon process starts (and writes out its mainnet/run/start-daemon.launching), the main “chia” CLI thinks that it has not done so, and refuses to start any of the other requested processes (node, farmer, etc).

To Reproduce

Steps to reproduce the behavior:

  1. Upgrade OS from Python 3.9 to 3.10
  2. (re)Build Chia
~$ cd /usr/local/chia-blockchain
~$ rm -rf venv
~$ bash ./install.sh
...
~$ . ./activate
(venv) ~$ chia version
1.2.9
(venv) ~$ chia start node
Daemon not started yet
Starting daemon
Daemon not started yet
Failed to create the chia daemon
(venv) ~$ pgrep chia
4368
(venv) ~$ ps -p 4368
  PID TTY          TIME CMD
 4368 pts/0    00:00:01 chia_daemon
(venv) ~$ cat ../mainnet/log/debug.log
2021-10-12T17:22:24.578 daemon chia.daemon.server         : INFO     Starting Daemon Server
2021-10-12T17:22:24.580 daemon chia.daemon.server         : INFO     Waiting Daemon WebSocketSer
(venv) $~ chia stop -d node
Daemon not started yet
Couldn't connect to chia daemon
(venv) ~$ killall chia_daemon
(venv) ~$ cat ../mainnet/log/debug.log
2021-10-12T17:22:24.578 daemon chia.daemon.server         : INFO     Starting Daemon Server
2021-10-12T17:22:24.580 daemon chia.daemon.server         : INFO     Waiting Daemon WebSocketServer closure
2021-10-12T17:39:34.066 daemon chia.daemon.server         : INFO     chia daemon exiting in 5 seconds
(venv) ~$
  1. Build an OS package for Python3.9 that installs to /opt or somewhere other than /usr. Install it. [ Insert expletives here ]
  2. Rebuild Chia
~$ python --version
Python 3.9.7
~$ cd /usr/local/chia-blockchain
~$ rm -rf venv
~$ bash ./install.sh
...
~$ . ./activate
(venv) ~$ chia version
1.2.9
(venv) ~$ chia start farmer
Daemon not started yet
Starting daemon
chia_harvester: Already running, use `-r` to restart
chia_farmer: Already running, use `-r` to restart
chia_full_node: Already running, use `-r` to restart
chia_wallet: Already running, use `-r` to restart
(venv) ~$

Expected behavior

Chia should start normally, as in the latter half of the description, above.

Desktop

  • OS: Slackware Linux
  • OS Version/Flavor: Current (pre-15.0)
  • CPU: x86_64, Ryzen 2700

Additional context

Note that the GUI works just fine under Python 3.10. Only the daemon has issues. (I didn’t try the timelord, as the CPU running the actual daemon - not my development machine - is much older.)

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 5
  • Comments: 19 (11 by maintainers)

Most upvoted comments

Note, main right now does work with python 3.10

Targeted to be fixed in 1.3.5