0

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.

Alex Zaitsev
  • 2,013
  • 4
  • 30
  • 56

1 Answers1

2

The reason was simple: wrong wifi creds

Alex Zaitsev
  • 2,013
  • 4
  • 30
  • 56