-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AttributeError: 'MsgHandler' object has no attribute 'connect' #2
Comments
Same issue here |
I used my phones hotspot and it worked so it might be a security issue within your network, try using a hotspot |
Same issue. |
In MQTTMsgHandler.py I replaced the calls to self.connect() with self.createSocketConnection() and I'm able to connect and publish to AWSIoT now. |
Thanks @stevieraysean. "Replaced the calls to self.connect() with self.createSocketConnection()" seems to be what the developers intended. I am still having an issue with connecting back to the network after a disconnect event with error 'Socket create error: [Errno 202] EAI_FAIL' occuring after a couple hours of successful packet sents. This error keeps printing. The program works perfectly after resetting. Any ideas? |
That’s weird. What method are you connecting with? Wifi? LTE? I’ve got a G01 on wifi that’s been sending a message every 5 seconds for the last 5.5 hours. 4000+ messages. Will see how it goes over the next few days.. |
I am using a GPy over LTE using Pybytes configuration. The issue may not be a socket problem as much as it is the LTE isn't reconnecting after a disconnect event. I will try add some lte disconnect/reconnect. Maybe that will help. |
@grahamPatico i've encountered this issue also. anyway, ended up fixing by adding if any exception happened in _send_packet(self, packet): then in _io_thread_func(self): then back in main or wherever when you detect network re-connection initialize the whole aws object and init again: I've had issues with _thread.exit() in other parts of my code, but it seems ok here. hope that helps.... Edit: My connection is over wifi, so usually good. but in the case the wifi router reset or something i needed to be able to shut this down and bring it back up again.. |
@stevieraysean |
This library is more complete. https://github.com/pycom/pycom-libraries/tree/master/lib/mqtt_aws |
Looking at AWSIoTPythonSDK/MQTTMsgHandler.py there is no connect method it seems. Known issue?
The text was updated successfully, but these errors were encountered: