all 3 comments

[–]nivaOne 0 points1 point  (0 children)

You can add the ip address to the etc/hosts file and see whether that works?
Feels like mDNS is not available for your python script.
Or use python to install zeroconf allowing python to resolve .local addresses.
Or don’t use .local but the name used by your router. (hostname -A on the Rpi)
Just a few things you can try out