[Core] NoneType object is not iterable bug

There is a bug in platformio/commands/run.py:80 where the code says something like:

check_project_envs(config, environment or env_default)

There is a bug in that when environment == () and env_default is None, () or None produces None. This then causes TypeError: NoneType object is not iterable at line 401 when doing set(None).

This bug is picked up in v3.5.2a7 on Windows. However, the same version number on my macOS does not have the same problem. In fact though the version number is the same, the run.py file is different.

The easiest fix is to set env_default = () at line 74.
Please check and fix this problem ASAP as it prevents proper functionality, at least on Windows.

Sorry! Fixed in the latest build. Please open PlatformIO IDE Terminal and type pio upgrade --dev

1 Like