Pybytes: MQTT ERROR! function got multiple values for argument 'user'



  • This is the error what I get after the boot.py finished.
    This issue could be related to that I am connecting our mqtt server in boot.py?
    Thank you!
    This is the whole thing:

    WMAC: 3C71BF878480
    Firmware: 1.20.2.rc10
    Pybytes: 1.5.1
    Initialized watchdog for WiFi and LTE connection with timeout 1260000 ms
    WiFi connection established
    MQTT ERROR! function got multiple values for argument 'user'
    ERROR! Could not connect to Pybytes!
    Pybytes configuration read from /flash/pybytes_config.json
    


  • I am sorry, forgot to post the solution.
    I even had a quick skype call with one of the pycom developers.
    Yes the solition was the same for me also. I renamed the file mqtt.py to something else like mqttclient.py, and it solved the issue. Somewhere deep there is a mqtt.py file in the pybytes firmware. That caused the issue.



  • I realize this is an old thread but it might help someone.
    Situation
    I had pybytes up and running after which I went to play with MQTT connectivity. For this I installed the mqtt.py from the lib on github. Afterward I wanted to go back to pybytes and placed my old boot.py and main.py but I left the /flash/lib/mqtt.py
    Error
    Upon restart I ran into the error message:
    MQTT ERROR! function got multiple values for argument 'user'
    Fix
    I removed the /flash/lib/mqtt.py and the error was gone.
    To my knowledge I did not do anything else to fix this. I suspect there is a naming clash in the mqtt module name which results in pybytes getting a different mqtt import or such?

    Anyway, this might help someone else get unstuck ;-)

    EDIT:
    Found another post that explains why this happens and provides an elegant solution:
    https://forum.pycom.io/topic/6801/mqtt-library-conflict-with-pybytes/2?_=1613294236230



  • I'm seeing this error also with a LoPy using MQTT library to retrieve data to display on a LED matrix.

    Firmware: 1.20.2.r1
    Pybytes: 1.6.0
    Initialized watchdog for WiFi and LTE connection with timeout 1260000 ms
    WiFi connection established
    MQTT ERROR! function got multiple values for argument 'user'
    ERROR! Could not connect to Pybytes!
    Pybytes configuration read from /flash/pybytes_config.json
    Connecting to WiFi
    Initialized watchdog for WiFi and LTE connection with timeout 1260000 ms
    WiFi connection established
    MQTT ERROR! function got multiple values for argument 'user'
    ERROR! Could not connect to Pybytes!
    

    Clearly this issue hasn't yet been fixed or even responded to.

    Thanks

    Andrew



  • @ahmadelmasri
    I experience same error 2.5 months later, any ideas?
    My config file
    {
    "wifi": {"ssid": "", "password": ""},
    "wlan_antenna": 0,
    "dump_ca": false,
    "server": "mqtt.pybytes.pycom.io",
    "ssl": false,
    "lte": {"apn": null, "cid": 1, "reset": false, "carrier": null, "band": null, "type": null},
    "device_id": "6ac49f67-a7b9-40a3-bed8-f3aea1e2c851",
    "network_preferences": ["wifi"],
    "ota_server": {"port": 443, "domain": "software.pycom.io"},
    "pybytes_autostart": true,
    "username": "m
    .*******@gmail.com"
    }



  • I did this morning. Thank you.



  • Hi @tttadam,

    We will take a look and get back to you.

    can you please share config details (without SSID, and password) with me on the below email address.

    ahmad@pycom.io

    Best Regards,
    Ahmad El Masri


Log in to reply
 

Pycom on Twitter