Closed hlovatt closed 17 hours ago
Kind of expected if you think about it. First version is trying to connect to local server, and has an error because local server is not running. You need to start the local server and then try to connect with client.
From the error message it fails before getting to 'spawning' either the server or client.
However, I'm away from my laptop and replying on my phone. Will check by swapping over spawning order when I'm back with laptop.
The script you're running is the client of an echo server. There's also a server to run. That is, you need to run (assuming you cloned trio
) python ./docs/source/tutorial/echo-server.py
and then python ./docs/source/tutorial/echo-client.py
.
This is noted in the tutorial as:
Note that this code will not work without a TCP server such as the one we’ll implement below.
Hopefully that will work. If the tutorial is structured weirdly, feel free to suggest changes!
Thanks. Completely missed that sentence in the tutorial. Works now.
The client server example in the tutorial fails because
open_tcp_stream
fails:Fails with:
If
echo_parent
is commented out and the alternate version ofecho_parent
un-commented, then works as expected.Using MacBook Air M1 2020 with Sequoia 15.1.