type error when build partitions_singleapp.bin

billmogen
Posts: 4
Joined: Tue May 29, 2018 1:50 am

type error when build partitions_singleapp.bin

Postby billmogen » Tue May 29, 2018 2:03 am

Hi, everyone:
build error follow:
Building partitions from /Users/billmogen/workspace/esp/esp-idf/components/partition_table/partitions_singleapp.csv...
Traceback (most recent call last):
File "/Users/billmogen/workspace/esp/esp-idf/components/partition_table/gen_esp32part.py", line 423, in <module>
main()
File "/Users/billmogen/workspace/esp/esp-idf/components/partition_table/gen_esp32part.py", line 395, in main
table_size = table.flash_size()
File "/Users/billmogen/workspace/esp/esp-idf/components/partition_table/gen_esp32part.py", line 122, in flash_size
last = sorted(self, reverse=True)[0]
TypeError: unorderable types: PartitionDefinition() < PartitionDefinition()
make: *** [/Users/billmogen/workspace/esp/hello_world/build/partitions_singleapp.bin] Error 1
my environment:
mac os sierra 10.12.6
python version 2.7.5 or 3.5
xtensa-esp32-elf-osx-1.22.0-80-g6c4433a-5.2.0
esp-idf latest

Thanks for checking.
From Bill

ESP_Angus
Posts: 2344
Joined: Sun May 08, 2016 4:11 am

Re: type error when build partitions_singleapp.bin

Postby ESP_Angus » Tue May 29, 2018 4:35 am

Hi Bill,

Is it possible your default Python version is Python 3? (You can check by running "python -V" in a terminal.)

ESP-IDF requires Python 2.x at the moment (we will be adding Python 3 support soon). You can change the Python interpreter in use under "make menuconfig" -> "SDK Tool Configuration" -> "Python 2 interpreter" and change "python" to "python2".

billmogen
Posts: 4
Joined: Tue May 29, 2018 1:50 am

Re: type error when build partitions_singleapp.bin

Postby billmogen » Tue May 29, 2018 6:38 am

Hi Angus:
You are right! The python version of esp-idf was 3.5 at that time, I changed the python version to 2.7. It was successful building.
Actually, there were many python versions in my workspace, I tried to use pyenv to control them, I just modified one folder's python
version to 2.7 use "pyenv local" command, so it builded wrong .

Best reguards.
From Bill.

Who is online

Users browsing this forum: Google [Bot], Majestic-12 [Bot] and 124 guests