Possible error in ES32-IDF v3.0, incorrect path "/home/ivan/esp-idf/.git/..." included?

jlrtrevenga
Posts: 4
Joined: Sun May 20, 2018 11:20 am

Possible error in ES32-IDF v3.0, incorrect path "/home/ivan/esp-idf/.git/..." included?

Postby jlrtrevenga » Sun May 20, 2018 2:45 pm

Please, consider that I have just started to test ESP32, so my knowledge is limited.

I have this environment:
- Ubuntu 18.04 running under Oracle Virtual Box v5.2.8
- ES32-IDF v3.0

Trying to run my first program, Hello_world example.
It has compiled ok, but when I try to flash it, I get the following reply:

jlrt@JLR-IoT:~/esp32_apps_jlr/hello_world$ make flash
fatal: not a git repository: /home/ivan/esp-idf/.git/modules/components/aws_iot/aws-iot-device-sdk-embedded-C
fatal: not a git repository: /home/ivan/esp-idf/.git/modules/components/aws_iot/aws-iot-device-sdk-embedded-C
Flashing binaries to serial port /dev/ttyUSB0 (app at offset 0x10000)...
esptool.py v2.1
Traceback (most recent call last):
File "/home/jlrt/esp/esp-idf-v3.0/components/esptool_py/esptool/esptool.py", line 2525, in <module>
_main()
File "/home/jlrt/esp/esp-idf-v3.0/components/esptool_py/esptool/esptool.py", line 2518, in _main
main()
File "/home/jlrt/esp/esp-idf-v3.0/components/esptool_py/esptool/esptool.py", line 2247, in main
esp = chip_class(args.port, initial_baud)
File "/home/jlrt/esp/esp-idf-v3.0/components/esptool_py/esptool/esptool.py", line 175, in __init__
if isinstance(port, serial.Serial):
AttributeError: 'module' object has no attribute 'Serial'
/home/jlrt/esp/esp-idf-v3.0/components/esptool_py/Makefile.projbuild:54: recipe for target 'flash' failed
make: *** [flash] Error 1

It seems it is trying to access a path that is not accesible, as it is referred to a particular user (some Ivan developer?).

Note: There is other possible error related to the serial port, I have already reported via another thread.

Thanks,

JLR

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

Re: Possible error in ES32-IDF v3.0, incorrect path "/home/ivan/esp-idf/.git/..." included?

Postby ESP_Angus » Mon May 21, 2018 1:46 am

Hi JLR,

Thanks for reporting these. Looks like there are two things here:
jlrtrevenga wrote: fatal: not a git repository: /home/ivan/esp-idf/.git/modules/components/aws_iot/aws-iot-device-sdk-embedded-C
fatal: not a git repository: /home/ivan/esp-idf/.git/modules/components/aws_iot/aws-iot-device-sdk-embedded-C
I think there is a mistake in the git submodules configured in the .zip file download of v3.0. You can fix this in your local copy by running these two commands:

Code: Select all

git submodule deinit --all -f
git submodule update --init --recursive
jlrtrevenga wrote: File "/home/jlrt/esp/esp-idf-v3.0/components/esptool_py/esptool/esptool.py", line 175, in __init__
if isinstance(port, serial.Serial):
AttributeError: 'module' object has no attribute 'Serial'
/home/jlrt/esp/esp-idf-v3.0/components/esptool_py/Makefile.projbuild:54: recipe for target 'flash' failed
I this is caused by having run "pip install serial" rather than "pip install pyserial". This is a known issue.

You can probably work around by running:

Code: Select all

sudo pip uninstall serial
sudo apt-get install python-serial
(You can alternatively install pyserial via pip with "pip install pyserial", but Ubuntu also has python-serial package so may as well use this one instead.)

Who is online

Users browsing this forum: No registered users and 55 guests