File "/home/martin/code/swimtracker-firmware/venv/lib/python3.10/site-packages/esptool/bin_image.py", line 639, in save
if segment.name == ".flash.appdesc":
AttributeError: 'ImageSegment' object has no attribute 'name'
Here a property .name is expected, but segment is an instance of ImageSegment which doesn't have that property. Perhaps this assumes that segment is an ElfSection?
Operating System
Ubuntu 22.04
Esptool Version
4.6.2
Python Version
3.10.12
Full Esptool Command Line that Was Run
No response
Esptool Output
I use esptool as a library. When loading and storing a ESP32 binary image using
img = LoadFirmwareImage("esp32", input_file) img.save(output_file)
after updating esptool I get the error:
Here a property
.name
is expected, but segment is an instance ofImageSegment
which doesn't have that property. Perhaps this assumes that segment is anElfSection
?https://github.com/espressif/esptool/blob/8c5f47f8d0be6bbfc2668791653fc8af75f3cd2b/esptool/bin_image.py#L638
I see two options to fix this:
ImageSegment
a name as wellif hasattr(segment, 'name') and segment.name == ".flash.appdesc"
orif isinstance(segment, ElfSection) and ...
What is the Expected Behaviour?
No response
More Information
No response
Other Steps to Reproduce
No response