PlatformIO Community

ValueError: Invalid simple block '^0.28.01'

When I create a new PIO project, then install the library I need, I get the error in the subject line. I’ll include the full error text below. I’m installing this library:
$ pio lib install envirodiy/EnviroDIY_ModularSensors@^0.28.01

My environment:
Windows 10 Pro 64-bit
VSCode 1.54.1
PIO Core 5.1.0
PIO Home 3.3.3
PIO IDE 2.3.0

Full error text (hyperlinks removed):


Obsolete PIO Core v5.1.0 is used (previous was 5.1.1a3)
Please remove multiple PIO Cores from a system:


Library Storage: C:\Users\Matt.Barney\Documents\Projects\PlatformIO\test1103.pio\libdeps\mayfly
Error: Traceback (most recent call last):
File “c:\users\matt.barney.platformio\penv\lib\site-packages\platformio_main_.py”, line 109, in main
cli() # pylint: disable=no-value-for-parameter
File “c:\users\matt.barney.platformio\penv\lib\site-packages\click\core.py”, line 829, in call
return self.main(*args, **kwargs)
File “c:\users\matt.barney.platformio\penv\lib\site-packages\click\core.py”, line 782, in main
rv = self.invoke(ctx)
File “c:\users\matt.barney.platformio\penv\lib\site-packages\platformio\commands_init_.py”, line 44, in invoke
return super(PlatformioCLI, self).invoke(ctx)
File “c:\users\matt.barney.platformio\penv\lib\site-packages\click\core.py”, line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “c:\users\matt.barney.platformio\penv\lib\site-packages\click\core.py”, line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “c:\users\matt.barney.platformio\penv\lib\site-packages\click\core.py”, line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “c:\users\matt.barney.platformio\penv\lib\site-packages\click\core.py”, line 610, in invoke
return callback(*args, **kwargs)
File “c:\users\matt.barney.platformio\penv\lib\site-packages\click\decorators.py”, line 21, in new_func
return f(get_current_context(), *args, **kwargs)
File “c:\users\matt.barney.platformio\penv\lib\site-packages\platformio\commands\lib\command.py”, line 157, in lib_install
installed_pkgs = {
File “c:\users\matt.barney.platformio\penv\lib\site-packages\platformio\commands\lib\command.py”, line 158, in
library: lm.install(library, silent=silent, force=force)
File “c:\users\matt.barney.platformio\penv\lib\site-packages\platformio\package\manager_install.py”, line 48, in install
pkg = self._install(
File “c:\users\matt.barney.platformio\penv\lib\site-packages\platformio\package\manager\library.py”, line 81, in _install
return super(LibraryPackageManager, self)._install(
File “c:\users\matt.barney.platformio\penv\lib\site-packages\platformio\package\manager_install.py”, line 65, in _install
spec = self.ensure_spec(spec)
File “c:\users\matt.barney.platformio\penv\lib\site-packages\platformio\package\manager\base.py”, line 102, in ensure_spec
return spec if isinstance(spec, PackageSpec) else PackageSpec(spec)
File “c:\users\matt.barney.platformio\penv\lib\site-packages\platformio\package\meta.py”, line 124, in init
self._parse(self.raw)
File “c:\users\matt.barney.platformio\penv\lib\site-packages\platformio\package\meta.py”, line 227, in _parse
raw = parser(raw)
File “c:\users\matt.barney.platformio\penv\lib\site-packages\platformio\package\meta.py”, line 250, in _parse_requirements
self.requirements = tokens[1].strip()
File “c:\users\matt.barney.platformio\penv\lib\site-packages\platformio\package\meta.py”, line 167, in requirements
else semantic_version.SimpleSpec(str(value))
File “c:\users\matt.barney.platformio\penv\lib\site-packages\semantic_version\base.py”, line 618, in init
self.clause = self._parse_to_clause(expression)
File “c:\users\matt.barney.platformio\penv\lib\site-packages\semantic_version\base.py”, line 1014, in _parse_to_clause
return cls.Parser.parse(expression)
File “c:\users\matt.barney.platformio\penv\lib\site-packages\semantic_version\base.py”, line 1034, in parse
raise ValueError(“Invalid simple block %r” % block)
ValueError: Invalid simple block ‘^0.28.01’

============================================================

An unexpected error occurred. Further steps:

  • Verify that you have the latest version of PlatformIO using
    pip install -U platformio command

  • Try to find answer in FAQ Troubleshooting section

  • Report this problem to the developers

============================================================

Note that if I specify:

lib_deps = envirodiy/EnviroDIY_ModularSensors@^0.28.01

in platformio.ini, no error displays, but the dependencies do not get downloaded.

That is also a problem (please see FAQ for solving) but not the cause of this exact problem you’re facing.

The problem is that the library was uploaded with an invalid semantic version description – 0.28.01 is invalid. It should have been something like 0.28.1.

If I thus execute

> pio lib install envirodiy/EnviroDIY_ModularSensors@^0.28.1
Library Storage: C:\Users\Max\Documents\PlatformIO\Projects\esp8266_airfilter\.pio\libdeps\ttgo-t-beam
Library Manager: Installing envirodiy/EnviroDIY_ModularSensors @ ^0.28.1
Library Manager: EnviroDIY_ModularSensors @ 0.28.1 has been installed!
Library Manager: Installing dependencies...
Library Manager: Installing envirodiy/EnviroDIY_DS3231 @ ~1.3.4
Library Manager: EnviroDIY_DS3231 @ 1.3.4 has been installed!
Library Manager: Installing arduino-libraries/RTCZero @ ~1.6.0
Library Manager: RTCZero @ 1.6.0 has been installed!
Library Manager: Installing greygnome/EnableInterrupt @ ~1.1.0
Downloading  [####################################]  100%
Library Manager: EnableInterrupt @ 1.1.0 has been installed!
Library Manager: Installing greiman/SdFat @ ~2.0.4
Downloading  [####################################]  100%
Library Manager: SdFat @ 2.0.5 has been installed!
Library Manager: Installing vshymanskyy/TinyGSM @ ~0.10.9
Library Manager: TinyGSM @ 0.10.9 has been installed!
Library Manager: Installing knolleary/PubSubClient @ ~2.8
Library Manager: PubSubClient @ 2.8.0 has been installed!
Library Manager: Installing adafruit/Adafruit BusIO @ ~1.7.2
Library Manager: Adafruit BusIO @ 1.7.2 has been installed!
Library Manager: Installing adafruit/Adafruit Unified Sensor @ ~1.1.4
Library Manager: Adafruit Unified Sensor @ 1.1.4 has been installed!
Library Manager: Installing git+https://github.com/soligen2010/Adafruit_ADS1X15.git#7d67b451f739e9a63f40f2d6d139ab582258572b
git version 2.29.2.windows.2
Cloning into 'C:\Users\Max\.platformio\.cache\tmp\pkg-installing-9omyw55k'...
remote: Enumerating objects: 6, done.
remote: Counting objects: 100% (6/6), done.
remote: Compressing objects: 100% (6/6), done.
Receiving objects:  90% (153/170): Total 170 (delta 1), reused 0 (delta 0), pack-reused 164
Receiving objects: 100% (170/170), 51.04 KiB | 661.00 KiB/s, done.
Resolving deltas: 100% (71/71), done.
HEAD is now at 7d67b45 Code Review Tweaks
Library Manager: Adafruit ADS1X15 @ 1.2.0+sha.7d67b45 has been installed!
Library Manager: Installing adafruit/Adafruit AM2315 @ ~2.1.0
Library Manager: Adafruit AM2315 @ 2.1.0 has been installed!
Library Manager: Installing adafruit/Adafruit BME280 Library @ ~2.1.2
Library Manager: Adafruit BME280 Library @ 2.1.2 has been installed!
Library Manager: Installing dependencies...
Library Manager: Adafruit Unified Sensor @ 1.1.4 is already installed
Library Manager: Installing adafruit/DHT sensor library @ ~1.4.0
Library Manager: DHT sensor library @ 1.4.1 has been installed!
Library Manager: Installing dependencies...
Library Manager: Adafruit Unified Sensor @ 1.1.4 is already installed
Library Manager: Installing adafruit/Adafruit INA219 @ ~1.1.0
Library Manager: Adafruit INA219 @ 1.1.0 has been installed!
Library Manager: Installing dependencies...
Library Manager: Installing Adafruit NeoPixel
Library Manager: Adafruit NeoPixel @ 1.7.0 has been installed!
Library Manager: Installing Adafruit GFX Library
Library Manager: Adafruit GFX Library @ 1.10.6 has been installed!
Library Manager: Installing dependencies...
Library Manager: Adafruit BusIO @ 1.7.2 is already installed
Library Manager: Installing Adafruit SSD1306
Library Manager: Adafruit SSD1306 @ 2.4.3 has been installed!
Library Manager: Installing dependencies...
Library Manager: Adafruit BusIO @ 1.7.2 is already installed
Library Manager: Installing adafruit/Adafruit MPL115A2 @ ~1.1.2
Library Manager: Adafruit MPL115A2 @ 1.1.3 has been installed!
Library Manager: Installing paulstoffregen/OneWire @ ~2.3.5
Library Manager: OneWire @ 2.3.5 has been installed!
Library Manager: Installing milesburton/DallasTemperature @ ~3.9.1
Library Manager: DallasTemperature @ 3.9.1 has been installed!
Library Manager: Installing dependencies...
Library Manager: OneWire @ 2.3.5 is already installed
Library Manager: Installing envirodiy/SDI-12 @ ~2.1.2
Library Manager: SDI-12 @ 2.1.2 has been installed!
Library Manager: Installing northernwidget/MS5803 @ ~0.1.2
Library Manager: MS5803 @ 0.1.2 has been installed!
Library Manager: Installing git+https://github.com/EnviroDIY/Tally_Library.git#Dev_I2C
git version 2.29.2.windows.2
Cloning into 'C:\Users\Max\.platformio\.cache\tmp\pkg-installing-jw3xretu'...
remote: Enumerating objects: 15, done.
remote: Counting objects: 100% (15/15), done.
remote: Compressing objects: 100% (13/13), done.
Receiving objects:  73% (11/15)sed 12 (delta 0), pack-reused 0
Receiving objects: 100% (15/15), 18.75 KiB | 3.75 MiB/s, done.
Library Manager: Tally_Library_I2C @ 0.1.0+sha.0bf7cb2 has been installed!
Library Manager: Installing envirodiy/SensorModbusMaster @ ~0.6.8
Library Manager: SensorModbusMaster @ 0.6.8 has been installed!
Library Manager: Installing envirodiy/KellerModbus @ ~0.2.2
Library Manager: KellerModbus @ 0.2.2 has been installed!
Library Manager: Installing dependencies...
Library Manager: SensorModbusMaster @ 0.6.8 is already installed
Library Manager: Installing envirodiy/YosemitechModbus @ ~0.2.3
Library Manager: YosemitechModbus @ 0.2.3 has been installed!
Library Manager: Installing dependencies...
Library Manager: SensorModbusMaster @ 0.6.8 is already installed

Library Storage: C:\Users\Max\Documents\PlatformIO\Projects\esp8266_airfilter\.pio\libdeps\esp12e
Library Manager: Installing envirodiy/EnviroDIY_ModularSensors @ ^0.28.1
Library Manager: EnviroDIY_ModularSensors @ 0.28.1 has been installed!
Library Manager: Installing dependencies...
Library Manager: Installing envirodiy/EnviroDIY_DS3231 @ ~1.3.4
Library Manager: EnviroDIY_DS3231 @ 1.3.4 has been installed!
Library Manager: Installing arduino-libraries/RTCZero @ ~1.6.0
Library Manager: RTCZero @ 1.6.0 has been installed!
Library Manager: Installing greygnome/EnableInterrupt @ ~1.1.0
Library Manager: EnableInterrupt @ 1.1.0 has been installed!
Library Manager: Installing greiman/SdFat @ ~2.0.4
Library Manager: SdFat @ 2.0.5 has been installed!
Library Manager: Installing vshymanskyy/TinyGSM @ ~0.10.9
Library Manager: TinyGSM @ 0.10.9 has been installed!
Library Manager: Installing knolleary/PubSubClient @ ~2.8
Library Manager: PubSubClient @ 2.8.0 has been installed!
Library Manager: Installing adafruit/Adafruit BusIO @ ~1.7.2
Library Manager: Adafruit BusIO @ 1.7.2 has been installed!
Library Manager: Installing adafruit/Adafruit Unified Sensor @ ~1.1.4
Library Manager: Adafruit Unified Sensor @ 1.1.4 has been installed!
Library Manager: Installing git+https://github.com/soligen2010/Adafruit_ADS1X15.git#7d67b451f739e9a63f40f2d6d139ab582258572b
git version 2.29.2.windows.2
Cloning into 'C:\Users\Max\.platformio\.cache\tmp\pkg-installing-9jxhse8c'...
remote: Enumerating objects: 6, done.
remote: Counting objects: 100% (6/6), done.
remote: Compressing objects: 100% (6/6), done.
Receiving objects:  96% (164/170)
Receiving objects: 100% (170/170), 51.04 KiB | 2.69 MiB/s, done.
Resolving deltas: 100% (71/71), done.
HEAD is now at 7d67b45 Code Review Tweaks
Library Manager: Adafruit ADS1X15 @ 1.2.0+sha.7d67b45 has been installed!
Library Manager: Installing adafruit/Adafruit AM2315 @ ~2.1.0
Library Manager: Adafruit AM2315 @ 2.1.0 has been installed!
Library Manager: Installing adafruit/Adafruit BME280 Library @ ~2.1.2
Library Manager: Adafruit BME280 Library @ 2.1.2 has been installed!
Library Manager: Installing dependencies...
Library Manager: Adafruit Unified Sensor @ 1.1.4 is already installed
Library Manager: Installing adafruit/DHT sensor library @ ~1.4.0
Library Manager: DHT sensor library @ 1.4.1 has been installed!
Library Manager: Installing dependencies...
Library Manager: Adafruit Unified Sensor @ 1.1.4 is already installed
Library Manager: Installing adafruit/Adafruit INA219 @ ~1.1.0
Library Manager: Adafruit INA219 @ 1.1.0 has been installed!
Library Manager: Installing dependencies...
Library Manager: Installing Adafruit NeoPixel
Library Manager: Adafruit NeoPixel @ 1.7.0 has been installed!
Library Manager: Installing Adafruit GFX Library
Library Manager: Adafruit GFX Library @ 1.10.6 has been installed!
Library Manager: Installing dependencies...
Library Manager: Adafruit BusIO @ 1.7.2 is already installed
Library Manager: Installing Adafruit SSD1306
Library Manager: Adafruit SSD1306 @ 2.4.3 has been installed!
Library Manager: Installing dependencies...
Library Manager: Adafruit BusIO @ 1.7.2 is already installed
Library Manager: Installing adafruit/Adafruit MPL115A2 @ ~1.1.2
Library Manager: Adafruit MPL115A2 @ 1.1.3 has been installed!
Library Manager: Installing paulstoffregen/OneWire @ ~2.3.5
Library Manager: OneWire @ 2.3.5 has been installed!
Library Manager: Installing milesburton/DallasTemperature @ ~3.9.1
Library Manager: DallasTemperature @ 3.9.1 has been installed!
Library Manager: Installing dependencies...
Library Manager: OneWire @ 2.3.5 is already installed
Library Manager: Installing envirodiy/SDI-12 @ ~2.1.2
Library Manager: SDI-12 @ 2.1.2 has been installed!
Library Manager: Installing northernwidget/MS5803 @ ~0.1.2
Library Manager: MS5803 @ 0.1.2 has been installed!
Library Manager: Installing git+https://github.com/EnviroDIY/Tally_Library.git#Dev_I2C
git version 2.29.2.windows.2
Cloning into 'C:\Users\Max\.platformio\.cache\tmp\pkg-installing-vu0pnhcg'...
remote: Enumerating objects: 15, done.
remote: Counting objects: 100% (15/15), done.
remote: Compressing objects: 100% (13/13), done.
Receiving objects:  53% (8/15)
Receiving objects: 100% (15/15), 18.75 KiB | 3.75 MiB/s, done.
Library Manager: Tally_Library_I2C @ 0.1.0+sha.0bf7cb2 has been installed!
Library Manager: Installing envirodiy/SensorModbusMaster @ ~0.6.8
Library Manager: SensorModbusMaster @ 0.6.8 has been installed!
Library Manager: Installing envirodiy/KellerModbus @ ~0.2.2
Library Manager: KellerModbus @ 0.2.2 has been installed!
Library Manager: Installing dependencies...
Library Manager: SensorModbusMaster @ 0.6.8 is already installed
Library Manager: Installing envirodiy/YosemitechModbus @ ~0.2.3
Library Manager: YosemitechModbus @ 0.2.3 has been installed!
Library Manager: Installing dependencies...
Library Manager: SensorModbusMaster @ 0.6.8 is already installed

Library Storage: C:\Users\Max\Documents\PlatformIO\Projects\esp8266_airfilter\.pio\libdeps\nanoatmega328
Library Manager: Installing envirodiy/EnviroDIY_ModularSensors @ ^0.28.1
Library Manager: EnviroDIY_ModularSensors @ 0.28.1 has been installed!
Library Manager: Installing dependencies...
Library Manager: Installing envirodiy/EnviroDIY_DS3231 @ ~1.3.4
Library Manager: EnviroDIY_DS3231 @ 1.3.4 has been installed!
Library Manager: Installing arduino-libraries/RTCZero @ ~1.6.0
Library Manager: RTCZero @ 1.6.0 has been installed!
Library Manager: Installing greygnome/EnableInterrupt @ ~1.1.0
Library Manager: EnableInterrupt @ 1.1.0 has been installed!
Library Manager: Installing greiman/SdFat @ ~2.0.4
Library Manager: SdFat @ 2.0.5 has been installed!
Library Manager: Installing vshymanskyy/TinyGSM @ ~0.10.9
Library Manager: TinyGSM @ 0.10.9 has been installed!
Library Manager: Installing knolleary/PubSubClient @ ~2.8
Library Manager: PubSubClient @ 2.8.0 has been installed!
Library Manager: Installing adafruit/Adafruit BusIO @ ~1.7.2
Library Manager: Adafruit BusIO @ 1.7.2 has been installed!
Library Manager: Installing adafruit/Adafruit Unified Sensor @ ~1.1.4
Library Manager: Adafruit Unified Sensor @ 1.1.4 has been installed!
Library Manager: Installing git+https://github.com/soligen2010/Adafruit_ADS1X15.git#7d67b451f739e9a63f40f2d6d139ab582258572b
git version 2.29.2.windows.2
Cloning into 'C:\Users\Max\.platformio\.cache\tmp\pkg-installing-e7nbe6k0'...
remote: Enumerating objects: 6, done.
remote: Counting objects: 100% (6/6), done.
remote: Compressing objects: 100% (6/6), done.
remote: Total 170 (delta 1), reused 0 (delta 0), pack-reused 164R
Receiving objects: 100% (170/170), 51.04 KiB | 1.16 MiB/s, done.
Resolving deltas: 100% (71/71), done.
HEAD is now at 7d67b45 Code Review Tweaks
Library Manager: Adafruit ADS1X15 @ 1.2.0+sha.7d67b45 has been installed!
Library Manager: Installing adafruit/Adafruit AM2315 @ ~2.1.0
Library Manager: Adafruit AM2315 @ 2.1.0 has been installed!
Library Manager: Installing adafruit/Adafruit BME280 Library @ ~2.1.2
Library Manager: Adafruit BME280 Library @ 2.1.2 has been installed!
Library Manager: Installing dependencies...
Library Manager: Adafruit Unified Sensor @ 1.1.4 is already installed
Library Manager: Installing adafruit/DHT sensor library @ ~1.4.0
Library Manager: DHT sensor library @ 1.4.1 has been installed!
Library Manager: Installing dependencies...
Library Manager: Adafruit Unified Sensor @ 1.1.4 is already installed
Library Manager: Installing adafruit/Adafruit INA219 @ ~1.1.0
Library Manager: Adafruit INA219 @ 1.1.0 has been installed!
Library Manager: Installing dependencies...
Library Manager: Installing Adafruit NeoPixel
Library Manager: Adafruit NeoPixel @ 1.7.0 has been installed!
Library Manager: Installing Adafruit GFX Library
Library Manager: Adafruit GFX Library @ 1.10.6 has been installed!
Library Manager: Installing dependencies...
Library Manager: Adafruit BusIO @ 1.7.2 is already installed
Library Manager: Installing Adafruit SSD1306
Library Manager: Adafruit SSD1306 @ 2.4.3 has been installed!
Library Manager: Installing dependencies...
Library Manager: Adafruit BusIO @ 1.7.2 is already installed
Library Manager: Installing adafruit/Adafruit MPL115A2 @ ~1.1.2
Library Manager: Adafruit MPL115A2 @ 1.1.3 has been installed!
Library Manager: Installing paulstoffregen/OneWire @ ~2.3.5
Library Manager: OneWire @ 2.3.5 has been installed!
Library Manager: Installing milesburton/DallasTemperature @ ~3.9.1
Library Manager: DallasTemperature @ 3.9.1 has been installed!
Library Manager: Installing dependencies...
Library Manager: OneWire @ 2.3.5 is already installed
Library Manager: Installing envirodiy/SDI-12 @ ~2.1.2
Library Manager: SDI-12 @ 2.1.2 has been installed!
Library Manager: Installing northernwidget/MS5803 @ ~0.1.2
Library Manager: MS5803 @ 0.1.2 has been installed!
Library Manager: Installing git+https://github.com/EnviroDIY/Tally_Library.git#Dev_I2C
git version 2.29.2.windows.2
Cloning into 'C:\Users\Max\.platformio\.cache\tmp\pkg-installing-8w7upq1i'...
remote: Enumerating objects: 15, done.
remote: Counting objects: 100% (15/15), done.
remote: Compressing objects: 100% (13/13), done.
Receiving objects:  46% (7/15)used 12 (delta 0), pack-reused 0
Receiving objects: 100% (15/15), 18.75 KiB | 3.12 MiB/s, done.
Library Manager: Tally_Library_I2C @ 0.1.0+sha.0bf7cb2 has been installed!
Library Manager: Installing envirodiy/SensorModbusMaster @ ~0.6.8
Library Manager: SensorModbusMaster @ 0.6.8 has been installed!
Library Manager: Installing envirodiy/KellerModbus @ ~0.2.2
Library Manager: KellerModbus @ 0.2.2 has been installed!
Library Manager: Installing dependencies...
Library Manager: SensorModbusMaster @ 0.6.8 is already installed
Library Manager: Installing envirodiy/YosemitechModbus @ ~0.2.3
Library Manager: YosemitechModbus @ 0.2.3 has been installed!
Library Manager: Installing dependencies...
Library Manager: SensorModbusMaster @ 0.6.8 is already installed

the library and its bazillion dependencies are installed.

CC @ivankravets, maybe the library registry should prevent publishing a library where the PlatformIO core logic will reject it as an invalid version description.

Ok, thank you @maxgerhardt! Now I know how to work around the issue, and I’ve reported the invalid version numbering to the library developer.

Note that PIO fails silently in the case when I add the dependency using lib_deps via the ini file. No error is displayed, but no libraries get installed. Ideally it would display an error in this instance.

I’ve been unable to fix the multiple cores problem, and will start a new thread to discuss:

@SRGDamia1 could you publish a new package with a valid SemVer format? 0.28.2. Thanks!