Compiler failing when trying to use variable interpolation

Compiler suddenly throwing a “argument of type ‘NoneType’ is not iterable” on line 0 of platformio.ini, when using the following variable interpolation syntax (previously compiling fine before today)

platform = espressif8266
framework = arduino
board = esp12e

build_flags = -D SOMEFLAG

See this documentation

This should be

upload_speed = 921600
1 Like

Thanks for your reply. Changed that, deleted .platformio cache directory, but still happening.

Okay found what’s happening. It’s actually due to using this syntax to output build flags:

build_flags =

This used to work?

Looks like environment variables now need to be prefixed with sysenv ie

build_flags = 

A nicer error msg please, powers that be!