Welcome to EnviroDIY, a community for do-it-yourself environmental science and monitoring. EnviroDIY is part of WikiWatershed, an initiative of Stroud Water Research Center designed to help people advance knowledge and stewardship of fresh water.
New to EnviroDIY? Start here

PlatformIO error with MS 0.28.01

Home Forums Mayfly Data Logger PlatformIO error with MS 0.28.01

Viewing 6 reply threads
  • Author
    • #15214
      Matt Barney

        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?

        To 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

        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

        (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’.)


      • #15217
        Anthony Aufdenkampe

          I recently had this problem too!

          The solution was to type:

          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.

        • #15218
          Matt Barney

            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.

            Thanks Anthony!


          • #15220
            Matt Barney
            • #15221
              Michael Daniel

                Hi all,
                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?

              • #15224
                Matt Barney

                  Hi Nancy,

                  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.


                • #15225
                  Sara Damiano

                    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.

                    • #15228
                      Michael Daniel

                        Thanks for the suggestion Matt,

                        It didn’t work very well, here’s the new error message:

                        Arduino: 1.8.13 (Windows Store (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


                        • #15229
                          Shannon Hicks

                            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/

                          • #15234
                            Michael Daniel

                              That worked!  Thanks Shannon!

                      Viewing 6 reply threads
                      • You must be logged in to reply to this topic.