我正在尝试在我的 esp8266 上运行一个套接字,但一直在运行OSError: -2
。
我试过了:
>>> addr = socket.getaddrinfo('smart-socket-bdcc5.firebaseio.com', 443)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
OSError: -2
和
>>> addr = socket.getaddrinfo('smart-socket-bdcc5.firebaseio.com', 80)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
OSError: -2
当我在通常的 python 命令行中执行它时,它可以正常工作。
我也试过usocket
而不是socket
- 没有帮助。