Error queueing metrics request: [Errno 8] nodename nor servname provided, or not known
Seems to be from: specklepy/logging/metrics.py, line 117, in __init__ self.user_ip = socket.gethostbyname(socket.gethostname()) socket.gaierror: [Errno 8] nodename nor servname provided, or not known
thanks a lot for reporting - and welcome to the forum! feel free to Introduce yourself if youād like.
this is unexpected behaviour as metrics shouldnāt be throwing errors - may I ask what OS / environment youāre using as I havenāt encountered this before?
either way, that attribute throwing the error isnāt used by our metrics anymore so Iāve dropped it and released v2.7.1 of specklepy which should resolve this issue for you! let me know if you run into any other issues getting started.
BTW I am on macOS 11.6.6 (20G624), if that has any bearing? Some of my minor internet sleuthing turns up a few issues re: socket and /etc/hosts, but I canāt seem to fix it via those suggestions.
Iām also using poetry for package management & venv
interesting! i havenāt done a lot of testing on mac yet (new mac user here!) but will have a look as well.
upgrading to specklepy 2.7.1 should resolve this issue, but please feel free to report back if anything else crops up
to clarify, were you still able to run the script or did the script actually throw and stop execution at this point? in theory, errors in metrics should only be logging warnings / errors to the console but shouldnāt actually be throwing and halting execution. if it is throwing though, Iāll have to investigate to find a fix hereā¦
It appears to be a potential issue in the Python code. To address it, you should ensure that both the hostname and IPv4 settings are properly configured. Once you have completed this step, you can proceed with resolving the problem.
import socket
hostname = socket.gethostname()
print(hostname) >> testsystem
# make sure do it
!echo "127.0.0.1 testsystem" >> /private/etc/hosts