OSError: -1
-
Hello , I'm trying to use Adafruit IO broker for MQTT programm , I get that error ''OSError: -1" , I would know what means that error . Thanks You
-
@YazIdo
without any deails provided noone can help you
show some sample code and point where you got an error -
Thank you for your react , there is the message displayed on the console :
Traceback (most recent call last):
File "<stdin>", line 89, in <module>
File "umqtt.py", line 173, in wait_msg
OSError: -1 -
@YazIdo said in OSError: -1:
line 173
please put some lines e.g. no 168..180 from your
umqtt.py
and mark which is 173 -
This is happening:
if res == b"": raise OSError(-1)The response is empty...
Response isres = self.sock.read(1) -
@yazido Do not use "keepalive" in function MQTTClient.
Examle:
c = MQTTClient("ESPython", "192.168.0.21", port=1883, user="user", password="pass", keepalive=0)
or
c = MQTTClient("ESPython", "192.168.0.21", port=1883, user="user", password="pass")
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login