Unable to upload - ESPTool not working

Hello,

I had until recently been using Version 0.11.1 with no problems.
I had downloaded Version 0.11.7 but decided not to install while I had no immediate need.

Machine : HP-Stream 11 running 64 bit Mint Linux 19.1.
I only have ESP8266 boards configured (Wemos D1 R2 & Mini).

Whilst browsing the libraries in the "Plugin Manager" I mistakenly performed an "Upgrade All". This had the effect of upgrading a lot of the ESP8266 libraries to Version 2.6.3-3., as well as other components. I am unsure of the previous version numbers of these upgraded components.

Following this mistakenly implemented upgrade, compilation of programs is still possible. There are no apparent problems but I am unable to perform an upload to a board I could previously access. I have tried a replacement board and get the same error message. I have also tried different programs that have been proven to compile and upload in the past with the same result.

I have determined that the error is associated with the "ESPTool" utility and it appears that there is a known problem with conflicting name space requirements (involving packages/resources for serial and pyserial).

The following is an excerpt from the esptool.py file.

"esptool.py depends on pyserial, but there is a conflict with a currently installed package named 'serial'.

You may be able to work around this by 'pip uninstall serial; pip install pyserial' \
but this may break other installed Python software that depends on 'serial'.

There is no good fix for this right now, apart from configuring virtualenvs. \
See https://github.com/espressif/esptool/issues/269#issuecomment-385298196 for discussion of the underlying issue(s).""")"

I have tried the uninstall and install steps as recommended but this made no difference. I do not use Python so am loathe to play around too much. I do not know if the use of 'virtual environments' would help and if so how these would be set up and work with UECIDE.

In addition, whilst checking out the UECIDE site I noticed that Version 0.11.8 was available, so I downloaded this.

In order to retain the existing setup I renamed the '.uecide' directory and did a fresh restart using Version 0.11.8, basically re-installing and selecting the same components but this again made no difference.

I have attached a print out of the compilation and upload messages below :

Compiling...
• Preprocessing...
• Converting binary files
• Generating linker script
• Compiling sketch...
◦ esp8266-ap-v1_combined.cpp
• Compiling core...
‣ esp8266
• Compiling libraries...
‣ ESP8266WiFi [/home/xxxxxx/.uecide/libraries/Communications/esp8266/ESP8266WiFi]
• Linking sketch...
‣ Generating bin file...
Creating BIN file "/tmp/build-61c08387-8ab2-4ed2-900b-1645ffc6a24a/esp8266-ap-v1.bin" using "/tmp/build-61c08387-8ab2-4ed2-900b-1645ffc6a24a/esp8266-ap-v1.elf"
‣ Generating eep file...
‣ Generating etx file...
‣ Generating lss file...
Compiling finished.
Memory usage
• Program size: 265,168 bytes
• Memory size: 26,776 bytes
• Compilation took 39.446 seconds.
Uploading firmware...
Pyserial is not installed for /usr/bin/python. Check the README for installation instructions.
Traceback (most recent call last):
File "/home/xxxxxx/.uecide/programmers/esptool/esptool.py", line 37, in <module>
import serial
ImportError: No module named serial

I am stuck and hope you can help.

1. Have you come across this problem before ?

2. Is this a python problem, a bug in UECIDE or a combination of both.
What version of python does UECIDE use ?

3. Do you have a solution or work around ?

4. Do you have any recommendations on the best way forward as I have already spent two days trying to cure this. This has side tracked me and stopped development.

Many thanks, hoping for a speedy response.

Tags: 

Comments

Looks like you're on Linux.

Looks like you're on Linux. The python package in UECIDE just uses the system-installed python, so you just need to install pyserial in the system. Assuming a Debian-based distro:

$ sudo apt-get install python-serial

Or if you're on a very new Ubuntu that is dropping python 2 support gradually you'll want to do it for python 3:

$ sudo apt-get install python3-serial

That should fix it.

Pages