xreef / EByte_LoRa_E22_python_raspberrypi_library

RaspberryPi LoRa EBYTE E22 device library complete and tested. sx1262/sx1268
https://www.mischianti.org/category/my-libraries/ebyte-lora-e22-devices/
Other
10 stars 1 forks source link

Can't decode byte 0xd0 #3

Open OrangeCat2528 opened 3 months ago

OrangeCat2528 commented 3 months ago

Hi, I'm using this code for my Lora experiment, and I'm wondering for this error always showing at me:

0|Receiver  | Traceback (most recent call last):
0|Receiver  |   File "/home/lora/receiver/app.py", line 83, in <module>
0|Receiver  |     code, value, rssi = lora.receive_message(rssi=True)
0|Receiver  |                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
0|Receiver  |   File "/home/lora/.local/lib/python3.11/site-packages/lora_e22.py", line 669, in receive_message
0|Receiver  |     data = data.decode('utf-8')
0|Receiver  |            ^^^^^^^^^^^^^^^^^^^^
0|Receiver  | UnicodeDecodeError: 'utf-8' codec can't decode byte 0xd0 in position 2: invalid continuation byte

I still don't have a solution for this error instead of re-edited the lora_e22 file to fix the utf-8 in the receive_message section. Thank you.