Alex Zaitsev
Alex Zaitsev

Reputation: 1781

socket.getaddrinfo keeps returning OSError: -2

i'm trying to run a socket on my esp8266 but keep getting OSError: -2.
I tried:

>>> addr = socket.getaddrinfo('smart-socket-bdcc5.firebaseio.com', 443)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
OSError: -2

and

>>> addr = socket.getaddrinfo('smart-socket-bdcc5.firebaseio.com', 80)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
OSError: -2

When I execute it in usual python command line it works ok.
Also I tried usocket instead of socket - hasn't helped.

Upvotes: 0

Views: 519

Answers (1)

Alex Zaitsev
Alex Zaitsev

Reputation: 1781

The reason was simple: wrong wifi creds

Upvotes: 2

Related Questions