You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
这个警告我不知道能不能处理 DeprecationWarning: Callback API version 1 is deprecated, update to latest version client = mqtt.Client(mqtt.CallbackAPIVersion.VERSION1)
See the migrations doc for info on this. But, in summary:
Expected signature for callback API version 2: connect_callback(client, userdata, connect_flags, reason_code, properties)
Expected signature for callback API version 1 change with MQTT protocol version:
* For MQTT v3.1 and v3.1.1 it's: connect_callback(client, userdata, flags, rc)
* For MQTT v5.0 it's: connect_callback(client, userdata, flags, reason_code, properties)
So you need to update your callbacks when changing the API version.
Note: I only speak English (and have not seen any Chinese responses in this repo).
我使用pahp-mqtt遇到一个警告,如下所示:
控制台:
这个警告我不知道能不能处理 DeprecationWarning: Callback API version 1 is deprecated, update to latest version client = mqtt.Client(mqtt.CallbackAPIVersion.VERSION1)
我将client = mqtt.Client(mqtt.CallbackAPIVersion.VERSION1)修改为client = mqtt.Client(mqtt.CallbackAPIVersion.VERSION2)后运行:
求大佬帮忙解决,谢谢
The text was updated successfully, but these errors were encountered: