Skip to content

mqttwarn does not like py39-paho-mqtt-2.0.0 #694

@dlangille

Description

@dlangille

I've been unable to get mqttwarn to start today after updating py39-paho-mqtt: 1.6.1 -> 2.0.0

Reverting to 1.6.1 gets it running again.

Seem related to https://stackoverflow.com/questions/77984857/paho-mqtt-unsupported-callback-api-version-error?noredirect=1

[12:20 mqtt01 dvl /usr/local/etc/rc.d] % sudo /usr/local/bin/mqttwarn --config-file=/usr/local/etc/mqttwarn/mqttwarn.ini
2024-03-02 12:20:58,853 INFO     [mqttwarn.commands         ] Starting mqttwarn
2024-03-02 12:20:58,853 INFO     [mqttwarn.commands         ] Log level is DEBUG
2024-03-02 12:20:58,853 DEBUG    [mqttwarn.core             ] Trying to load built-in service "file" from "file"
2024-03-02 12:20:58,854 DEBUG    [mqttwarn.core             ] Trying to load service "file" from file "/usr/local/lib/python3.9/site-packages/mqttwarn/services/file.py"
2024-03-02 12:20:58,855 INFO     [mqttwarn.core             ] Successfully loaded service "file"
2024-03-02 12:20:58,855 DEBUG    [mqttwarn.core             ] Trying to load built-in service "pushover" from "pushover"
2024-03-02 12:20:58,855 DEBUG    [mqttwarn.core             ] Trying to load service "pushover" from file "/usr/local/lib/python3.9/site-packages/mqttwarn/services/pushover.py"
2024-03-02 12:20:58,985 INFO     [mqttwarn.core             ] Successfully loaded service "pushover"
2024-03-02 12:20:58,986 DEBUG    [mqttwarn.core             ] Trying to load built-in service "log" from "log"
2024-03-02 12:20:58,986 DEBUG    [mqttwarn.core             ] Trying to load service "log" from file "/usr/local/lib/python3.9/site-packages/mqttwarn/services/log.py"
2024-03-02 12:20:58,986 INFO     [mqttwarn.core             ] Successfully loaded service "log"
Traceback (most recent call last):
  File "/usr/local/bin/mqttwarn", line 8, in <module>
    sys.exit(run())
  File "/usr/local/lib/python3.9/site-packages/mqttwarn/commands.py", line 93, in run
    run_mqttwarn(configfile=options["--config-file"])
  File "/usr/local/lib/python3.9/site-packages/mqttwarn/commands.py", line 155, in run_mqttwarn
    subscribe_forever()
  File "/usr/local/lib/python3.9/site-packages/mqttwarn/core.py", line 688, in subscribe_forever
    mqttc = connect()
  File "/usr/local/lib/python3.9/site-packages/mqttwarn/core.py", line 642, in connect
    mqttc = paho.Client(cf.clientid, clean_session=cf.cleansession, protocol=cf.protocol)
  File "/usr/local/lib/python3.9/site-packages/paho/mqtt/client.py", line 766, in __init__
    raise ValueError(
[12:20 mqtt01 dvl /usr/local/etc/rc.d] % sudo /usr/local/bin/mqttwarn --config-file=/usr/local/etc/mqttwarn/mqttwarn.ini
2024-03-02 12:20:58,853 INFO     [mqttwarn.commands         ] Starting mqttwarn
2024-03-02 12:20:58,853 INFO     [mqttwarn.commands         ] Log level is DEBUG
2024-03-02 12:20:58,853 DEBUG    [mqttwarn.core             ] Trying to load built-in service "file" from "file"
2024-03-02 12:20:58,854 DEBUG    [mqttwarn.core             ] Trying to load service "file" from file "/usr/local/lib/python3.9/site-packages/mqttwarn/services/file.py"
2024-03-02 12:20:58,855 INFO     [mqttwarn.core             ] Successfully loaded service "file"
2024-03-02 12:20:58,855 DEBUG    [mqttwarn.core             ] Trying to load built-in service "pushover" from "pushover"
2024-03-02 12:20:58,855 DEBUG    [mqttwarn.core             ] Trying to load service "pushover" from file "/usr/local/lib/python3.9/site-packages/mqttwarn/services/pushover.py"
2024-03-02 12:20:58,985 INFO     [mqttwarn.core             ] Successfully loaded service "pushover"
2024-03-02 12:20:58,986 DEBUG    [mqttwarn.core             ] Trying to load built-in service "log" from "log"
2024-03-02 12:20:58,986 DEBUG    [mqttwarn.core             ] Trying to load service "log" from file "/usr/local/lib/python3.9/site-packages/mqttwarn/services/log.py"
2024-03-02 12:20:58,986 INFO     [mqttwarn.core             ] Successfully loaded service "log"
Traceback (most recent call last):
  File "/usr/local/bin/mqttwarn", line 8, in <module>
    sys.exit(run())
  File "/usr/local/lib/python3.9/site-packages/mqttwarn/commands.py", line 93, in run
    run_mqttwarn(configfile=options["--config-file"])
  File "/usr/local/lib/python3.9/site-packages/mqttwarn/commands.py", line 155, in run_mqttwarn
    subscribe_forever()
  File "/usr/local/lib/python3.9/site-packages/mqttwarn/core.py", line 688, in subscribe_forever
    mqttc = connect()
  File "/usr/local/lib/python3.9/site-packages/mqttwarn/core.py", line 642, in connect
    mqttc = paho.Client(cf.clientid, clean_session=cf.cleansession, protocol=cf.protocol)
  File "/usr/local/lib/python3.9/site-packages/paho/mqtt/client.py", line 766, in __init__
    raise ValueError(
ValueError: Unsupported callback API version: version 2.0 added a callback_api_version, see migrations.md for details

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions