Tag: ESP32

WARNING: Ignoring invalid distribution -ycparser in PlatformIO

Lately, I have been working on an ESP32 firmware using PlatformIO. I went with PlatformIO because it works quite nicely within my familiar Visual Studio Code environment. PlatformIO worked well for a few weeks until recently, when I started seeing the following errors.

WARNING: Ignoring invalid distribution -ycparser (/Users/thebitguru/.platformio/penv/lib/python3.10/site-packages)
WARNING: Ignoring invalid distribution -uture (/Users/thebitguru/.platformio/penv/lib/python3.10/site-packages)
WARNING: Ignoring invalid distribution -ryptography (/Users/thebitguru/.platformio/penv/lib/python3.10/site-packages)
WARNING: Ignoring invalid distribution -configlib (/Users/thebitguru/.platformio/penv/lib/python3.10/site-packages)
WARNING: Ignoring invalid distribution -ycparser (/Users/thebitguru/.platformio/penv/lib/python3.10/site-packages)
WARNING: Ignoring invalid distribution -uture (/Users/thebitguru/.platformio/penv/lib/python3.10/site-packages)
WARNING: Ignoring invalid distribution -ycparser (/Users/thebitguru/.platformio/penv/lib/python3.10/site-packages)
...
Screenshot of the Python warnings that I was getting.

I haven’t touched Python in a while, so I wasn’t sure what was going on here. A quick Google search for these warnings with “PlatformIO” didn’t turn up anything. So, I had to dig deeper and search for general Python and PIP errors.

After a little searching, I found out that apparently pip leaves old package directories around if something goes wrong, and never cleans them up. These folders then result in these warnings. As suggested in the linked page, the solution was to delete all the directories starting with a tilde (~). Pip will then reinstall the missing packages as needed and the warnings will go away.

I can finally have a cleaner build output again! Now only if I can get the esp32_exception_decoder monitor filter to work again…

Firmware Upload to ESP32 Failing Intermittently

Assembled Adafruit HUZZAH32 – ESP32 Feather Board - with Stacking Headers
Adafruit Huzzah32

I have recently been playing around with a side project that uses the ESP32 SOC/microcontroller, the Adafruit Huzzah32 flavor specifically. I am controlling a motor with it and use a ULN2003 to drive it. I noticed that when I connected the driver, I couldn’t upload a new firmware to it. After doing some troubleshooting and research, I learned that my pins were the issue.

Specifically, GPIO PIN #12 was the issue for me. It’s one of the strapping pins used for the different boot modes. I am sure there are ways to address this, but I ended up switching to a different and now I can upload firmware as needed.

Here is a link to the ESP32 datasheet for anyone interested in seeing more details.