Home › Forums › Mayfly Data Logger › PlatformIO error with MS 0.28.01
- This topic has 9 replies, 5 voices, and was last updated 2021-03-10 at 2:36 PM by Michael Daniel.
2021-03-05 at 2:06 PM #15214
When adding ModSensors 0.28.01 to a new project, I get the error: ValueError: Invalid simple block ‘^0.28.01’. I’ve included the full error text in the attached file. I’m getting this on multiple PCs, and other versions of MS do not give me this error.
I suspect this is a PlatformIO problem, but I’m posting here to see if others have seen it or can reproduce?
Create new PIO project
Add ModSensors library to the project from the PIO Registry: from PIO Home, click Libraries, search for ModularSensors and add it.
An error pane pops up with the error described. I’ll attach a screencap of the error pane too.
I can also generate the error by creating a new project and adding this line to platformio.ini and saving it:
lib_deps = envirodiy/EnviroDIY_ModularSensors@^0.28.01
I do *not* get the error if I instead specify ModularSensors using any of the following:
lib_deps = envirodiy/EnviroDIY_ModularSensors@^0.28
lib_deps = envirodiy/EnviroDIY_ModularSensors@0.27.8
lib_deps = envirodiy/EnviroDIY_ModularSensors
Windows 10 Pro 64-bit
PIO Core 5.1.0
PIO Home 3.3.3
PIO IDE 2.3.0
(In the attached error message, there is also an error that I believe is unrelated: ‘Obsolete PIO Core, please remeove multiple PIO Cores from a system’. It began when I installed the -dev version of PIO Core and then uninstalled it after it didn’t solve the ‘ValueError’.)
2021-03-05 at 2:38 PM #15217Anthony AufdenkampeParticipant
I recently had this problem too!
The solution was to type:INI1lib_deps = envirodiy/EnviroDIY_ModularSensors@0.28.1
So, drop the “0”. Everything worked well, and it properly fetched v0.28.01.
I’m not sure why Sara added that 0 to this version, but I suspect is was for a reason, but unfortunately the PlatformIO library registry doesn’t like having that 0 there.
2021-03-05 at 3:21 PM #15218
I suspected that was it! Confirmed that the .1 works for me as well.
I don’t believe 0.28.01 is valid, per semver.org: “Numeric identifiers MUST NOT include leading zeroes.”
Interestingly, sometimes PIO will fail silently when I use 0.28.01 via lib_deps (no error message), but it doesn’t install the lib dependencies at all. When I change it to 0.28.1, the dependencies install properly. I’ve reported on the PIO community because I think that the error handling could be improved.
2021-03-06 at 9:55 AM #15220
Confirmed via the PIO forum: https://community.platformio.org/t/valueerror-invalid-simple-block-0-28-01/19759
2021-03-08 at 9:10 AM #15221
I’m new to all this so still using ArduinoIDE for now. I’m getting a similar error when trying to change the address for a Meters CDT sensor. (One of the ones I recently purchased was recalled so I am trying to connect a different one).
The error reads “Invalid version ‘0.28.01’ for library in: C:\Users\lillyn\Documents\Arduino\libraries\EnviroDIY_ModularSensors”
Any suggestions on how to fix it?
2021-03-08 at 5:38 PM #15224
I don’t use the Arduino IDE, but as a workaround, I’d try downloading a previous version of ModularSensors. Delete ModularSensors from your Arduino libraries folder, and grab a zip of the previous version, 0.27.8 from the Releases page on github and install it instead.
2021-03-09 at 8:00 AM #15225Sara DamianoModerator
I’m so sorry about the bad version number! I’ll put out a new release to fix it!
@aufdenkape – The only reason was that I was thinking about the way Windows sorts files alphabetically where having the leading zero helps. That’s pretty meaningless for this, so it needs to be fixed.
2021-03-09 at 4:40 PM #15228
Thanks for the suggestion Matt,
It didn’t work very well, here’s the new error message:
Arduino: 1.8.13 (Windows Store 188.8.131.52) (Windows 10), Board: “Arduino Uno”
Sketch uses 6206 bytes (19%) of program storage space. Maximum is 32256 bytes.
Global variables use 631 bytes (30%) of dynamic memory, leaving 1417 bytes for local variables. Maximum is 2048 bytes.
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x50
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x6f
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x77
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x65
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x72
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x69
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x6e
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x67
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x20
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x75
An error occurred while uploading the sketch
2021-03-09 at 4:54 PM #15229Shannon HicksModerator
It shows you’ve got “Arduino Uno” selected as your board type. If you’re using a Mayfly, you need to change that in the “Tools–> Board” menu. Once you’ve done that, also make sure you’ve selected the right COM port. All of this is assuming you’ve already added the Mayfly board to the IDE as a supported board, using the instructions here: https://www.envirodiy.org/mayfly/software/
2021-03-10 at 2:36 PM #15234
That worked! Thanks Shannon!
- You must be logged in to reply to this topic.