Welcome to the Pycom forum Forum
    • \[\[global:header.categories\]\]
    • \[\[global:header.recent\]\]
    • \[\[global:header.tags\]\]
    • \[\[global:header.popular\]\]
    • Login

    Explore Pybytes | Official Documentation | Report a Firmware Bug/Issue | GitHub

    AttributeError: 'MQTTClient' object has no attribute '_send_str'

    Scheduled Pinned Locked Moved MicroPython
    1 Posts 1 Posters 177 Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • C Offline
      cmisztur
      last edited by

      Here is something strange that I just can't wrap my mind around. I am using the stock umqtt.robust and everything works fine for a couple hours. Then all of the sudden I get below exception. Once code exits into REPL, I can verify that '_send_str' is an attribute of my MQTTClient instance.

      Thoughts?

      File "L99_MQTT.py", line 36, in publish
        File "/flash/lib/umqtt/robust.py", line 56, in publish
        File "/flash/lib/umqtt/robust.py", line 54, in publish
        File "/flash/lib/umqtt/simple.py", line 124, in publish
      AttributeError: 'MQTTClient' object has no attribute '_send_str'
      Pycom MicroPython 1.18.2.r7 [v1.8.6-849-df9f237] on 2019-05-14; LoPy4 with ESP32
      
      >>> dir(_mqtt._client)
      ['after_connect', 'DELAY', 'delay', 'subscribe', '__qualname__', 'reconnect', '__init__', 'DEBUG', 'connect', 'check_msg', 'publish', 'log', 'wait_msg', '__module__', 'ssl', '_subscriptions', 'user', 'port', '_on_reconnect', 'lw_qos', 'pid', 'client_id', 'keepalive', 'pswd', 'lw_msg', 'server', 'sock', 'lw_retain', 'ssl_params', 'cb', 'lw_topic']
      
      >>> getattr(_mqtt._client, '_send_str')
      <bound_method>
      
      1 Reply Last reply Reply Quote 0

      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
      • 1 / 1
      • First post
        Last post

      Pycom on Twitter

      Pycom