Raspberry Pi 和 Bluemix - publishEvent() 的类型错误

Raspberry Pi and Bluemix - TypeError for publishEvent()

嘿,我学习了 https://developer.ibm.com/bluemix/2015/04/02/tutorial-using-a-raspberry-pi-python-iot-twilio-bluemix/ 上的教程,但有一行让我很生气。

client.publishEvent("raspberrypi",options["deviceId"], "input", myData)

类型错误:publishEvent() 需要至少 6 个参数(给定 5 个)

有什么建议吗?

在教程的评论中"Mike D"说:

This problem is covered in the IBM board. You now have to specify the message packing.

客户端最近发生了变化,它期望的第 6 个参数是 message format

第 5 个参数就是 json

client.publishEvent("raspberrypi", options["deviceId"], "input", "json", myData)

编辑: 更新了 source code.