UnicodeDecodeError error with otatool.py

julienD
Posts: 32
Joined: Fri Sep 13, 2019 12:38 pm

UnicodeDecodeError error with otatool.py

Postby julienD » Wed Feb 14, 2024 4:17 pm

Hello,

I would like to dump the current values of otadata. For this purpose, I'm using otatool.py.

With this command

Code: Select all

esp512/esp-idf/components/app_update/otatool.py -p /dev/ttyUSB1 -b 460800 read_otadata
I get this error:

Code: Select all

Running /usr/bin/python /home/ju/tools/esp-idf/components/esptool_py/esptool/esptool.py --port /dev/ttyUSB1 --baud 460800 read_flash 32768 3072 /tmp/tmpyttebszk...
esptool.py v3.3-dev
Serial port /dev/ttyUSB1
Connecting....
Detecting chip type... Unsupported detection protocol, switching and trying again...
Connecting.........
Detecting chip type... ESP32
Chip is ESP32-D0WDQ6 (revision 1)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: ac:67:b2:11:e4:b8
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 460800
Changed.
3072 (100 %)
3072 (100 %)
Read 3072 bytes at 0x8000 in 0.1 seconds (314.1 kbit/s)...
Hard resetting via RTS pin...
Traceback (most recent call last):
  File "/home/ju/esp512/esp-idf/components/app_update/otatool.py", line 373, in <module>
    main()
  File "/home/ju/esp512/esp-idf/components/app_update/otatool.py", line 324, in main
    target = OtatoolTarget(**target_args)
  File "/home/ju/esp512/esp-idf/components/app_update/otatool.py", line 45, in __init__
    self.target = ParttoolTarget(port, baud, partition_table_offset, partition_table_file, esptool_args,
  File "/home/ju/tools/esp-idf/components/partition_table/parttool.py", line 116, in __init__
    partition_table = gen.PartitionTable.from_binary(f.read())
  File "/home/ju/tools/esp-idf/components/partition_table/gen_esp32part.py", line 281, in from_binary
    result.append(PartitionDefinition.from_binary(data))
  File "/home/ju/tools/esp-idf/components/partition_table/gen_esp32part.py", line 433, in from_binary
    res.name = res.name.decode()
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xa1 in position 0: invalid start byte
How can I solve this?

Thanks
Julien

Who is online

Users browsing this forum: Bing [Bot], ShinyGlossy and 203 guests