PlatformIO Community

ValueError: Invalid simple block '9d5f56fba1':

My code compiles on one machine but not on the other
Here is the compile error

Processing adafruit_feather_m0 (platform: atmelsam@3.9.0; board: adafruit_feather_m0; framework: arduino)
------------------------------------------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/atmelsam/adafruit_feather_m0.html
PLATFORM: Atmel SAM (3.9.0) > Adafruit Feather M0
HARDWARE: SAMD21G18A 48MHz, 32KB RAM, 256KB Flash
DEBUG: Current (atmel-ice) External (atmel-ice, blackmagic, jlink)
PACKAGES: 
 - framework-arduinosam 4.4.191002 
 - toolchain-gccarmnoneeabi 1.70201.0 (7.2.1)
Converting code.ino
LDF: Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
ValueError: Invalid simple block '9d5f56fba1':
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/platformio/builder/main.py", line 169:
    env.SConscript("$BUILD_SCRIPT")
  File "/Users/****/.platformio/packages/tool-scons/script/../engine/SCons/Script/SConscript.py", line 597:
    return _SConscript(self.fs, *files, **subst_kw)
  File "/Users/****/.platformio/packages/tool-scons/script/../engine/SCons/Script/SConscript.py", line 286:
    exec(compile(scriptdata, scriptname, 'exec'), call_stack[-1].globals)
  File "/Users/****/.platformio/platforms/atmelsam/builder/main.py", line 120:
    target_elf = env.BuildProgram()
  File "/Users/****/.platformio/packages/tool-scons/script/../engine/SCons/Environment.py", line 219:
    return self.method(*nargs, **kwargs)
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/platformio/builder/tools/platformio.py", line 62:
    env.ProcessProjectDeps()
  File "/Users/****/.platformio/packages/tool-scons/script/../engine/SCons/Environment.py", line 219:
    return self.method(*nargs, **kwargs)
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/platformio/builder/tools/platformio.py", line 135:
    project_lib_builder = env.ConfigureProjectLibBuilder()
  File "/Users/****/.platformio/packages/tool-scons/script/../engine/SCons/Environment.py", line 219:
    return self.method(*nargs, **kwargs)
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/platformio/builder/tools/piolib.py", line 1047:
    project.install_dependencies()
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/platformio/builder/tools/piolib.py", line 871:
    if lm.get_package(spec):
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/platformio/package/manager/base.py", line 227:
    spec = self.ensure_spec(spec)
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/platformio/package/manager/base.py", line 100:
    return spec if isinstance(spec, PackageSpec) else PackageSpec(spec)
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/platformio/package/meta.py", line 118:
    self._parse(raw)
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/platformio/package/meta.py", line 220:
    raw = parser(raw)
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/platformio/package/meta.py", line 237:
    self.requirements = tokens[1].strip()
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/platformio/package/meta.py", line 161:
    else semantic_version.SimpleSpec(str(value))
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/semantic_version/base.py", line 618:
    self.clause = self._parse_to_clause(expression)
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/semantic_version/base.py", line 1014:
    return cls.Parser.parse(expression)
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/semantic_version/base.py", line 1034:
    raise ValueError("Invalid simple block %r" % block)
============================================================= [FAILED] Took 0.67 seconds =============================================================
The terminal process "platformio 'run'" terminated with exit code: 1.

Terminal will be reused by tasks, press any key to close it.

At a guess, something is wrong with either the Python install, or the framework files. It looks like you’re on a Mac? If so, maybe a Mac user can help you with that…

Ok I found the problem
I am using a Morse library with

lib_deps =
868@1.2.3 ; SD
1192@0.7.1 ; flash storage
5169@1.2.4 ;SSD1306Ascii
281@9d5f56fba1 ; Morse

but the version reference is causing a problem
I changed it to

lib_deps =
868@1.2.3 ; SD
1192@0.7.1 ; flash storage
5169@1.2.4 ;SSD1306Ascii
281; Morse

and it works

1 Like

I see you use PlatformIO 4.4 with a new package management system. We fully switched to semantic versioning. See updated library version https://platformio.org/lib/show/281/Morse

1 Like