Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python3 support #13

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

python3 support #13

wants to merge 7 commits into from

Conversation

jpgimenez
Copy link

No description provided.

Juan-gimenez-globant and others added 7 commits August 3, 2020 22:46
This reverts commit 9514f4e.
This reverts commit 28c1955.
This reverts commit a2e8901.
This reverts commit 67d4783.
@ste-ta
Copy link

ste-ta commented Apr 8, 2021

Hey @jpgimenez,

I used your fork in order to get cbpi3 back up running on python3. Thanks a lot. However I encounter one isse with the MQTTPlugin. It looks as if the MQTT data is in bytes and causes issues:

2021-04-08T14:00:52.518603552Z Traceback (most recent call last):

2021-04-08T14:00:52.518648181Z File "/usr/local/lib/python3.8/threading.py", line 932, in _bootstrap_inner

2021-04-08T14:00:52.518690088Z self.run()

2021-04-08T14:00:52.518729625Z File "/usr/src/app/modules/plugins/MQTTPlugin/init.py", line 51, in run

2021-04-08T14:00:52.518769440Z self.client.loop_forever()

2021-04-08T14:00:52.518808050Z File "/usr/local/lib/python3.8/site-packages/paho/mqtt/client.py", line 1779, in loop_forever

2021-04-08T14:00:52.518847513Z rc = self.loop(timeout, max_packets)

2021-04-08T14:00:52.518885920Z File "/usr/local/lib/python3.8/site-packages/paho/mqtt/client.py", line 1181, in loop

2021-04-08T14:00:52.518925198Z rc = self.loop_read(max_packets)

2021-04-08T14:00:52.518963568Z File "/usr/local/lib/python3.8/site-packages/paho/mqtt/client.py", line 1572, in loop_read

2021-04-08T14:00:52.519002734Z rc = self._packet_read()

2021-04-08T14:00:52.519040549Z File "/usr/local/lib/python3.8/site-packages/paho/mqtt/client.py", line 2310, in _packet_read

2021-04-08T14:00:52.519079511Z rc = self._packet_handle()

2021-04-08T14:00:52.519117511Z File "/usr/local/lib/python3.8/site-packages/paho/mqtt/client.py", line 2936, in _packet_handle

2021-04-08T14:00:52.519156548Z return self._handle_publish()

2021-04-08T14:00:52.519194677Z File "/usr/local/lib/python3.8/site-packages/paho/mqtt/client.py", line 3216, in _handle_publish

2021-04-08T14:00:52.519233640Z self._handle_on_message(message)

2021-04-08T14:00:52.519271658Z File "/usr/local/lib/python3.8/site-packages/paho/mqtt/client.py", line 3429, in _handle_on_message

2021-04-08T14:00:52.519355657Z callback(self, self._userdata, message)

2021-04-08T14:00:52.519394398Z File "/usr/src/app/modules/plugins/MQTTPlugin/init.py", line 187, in on_message

2021-04-08T14:00:52.519431527Z print(("payload " + msg.payload))

2021-04-08T14:00:52.519468083Z TypeError: can only concatenate str (not "bytes") to str

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants