Suddenly getting lots of 'Could not parse manifest' errors

Running PlatformIO, version 4.4.0a8, on Windows 10. Suddenly getting lots of Could not parse manifest errors, against both espressif8266 and atmelAvr platforms, and unable to build anything. I’ve deleted my %userprofile%\.platformio\{.cache, penv, python37} folders and let PIO reinstall. I am now running VSCode 1.48, but was running 1.47.3 when the error first appear, so does not appear related.

It does not appear to be a ‘new’ error, but the old reasons may have been be related to a pre PIO 4.1.1 bug.

Processing d1_mini_80Mhz (board: d1_mini; platform: espressif8266@2.5.1; framework: arduino)
-------------------------------------------------------------------------------------------------------------------------------Tool Manager: Could not parse manifest -> Expecting value: line 1 column 1 (char 0)
Tool Manager: Could not parse manifest -> Expecting value: line 1 column 1 (char 0)
Verbose mode can be enabled via `-v, --verbose` option
Tool Manager: Could not parse manifest -> Expecting value: line 1 column 1 (char 0)
AttributeError: 'NoneType' object has no attribute 'version':
  File "C:\users\peter\.platformio\penv\lib\site-packages\platformio\builder\main.py", line 169:
    env.SConscript("$BUILD_SCRIPT")
  File "C:\Users\Peter\.platformio\packages\tool-scons\script\..\engine\SCons\Script\SConscript.py", line 597:
    return _SConscript(self.fs, *files, **subst_kw)
  File "C:\Users\Peter\.platformio\packages\tool-scons\script\..\engine\SCons\Script\SConscript.py", line 286:
    exec(compile(scriptdata, scriptname, 'exec'), call_stack[-1].globals)
  File "C:\users\peter\.platformio\platforms\espressif8266@2.5.1\builder\main.py", line 216:
    target_elf = env.BuildProgram()
  File "C:\Users\Peter\.platformio\packages\tool-scons\script\..\engine\SCons\Environment.py", line 219:
    return self.method(*nargs, **kwargs)
  File "C:\users\peter\.platformio\penv\lib\site-packages\platformio\builder\tools\platformio.py", line 61:
    env.ProcessProgramDeps()
  File "C:\Users\Peter\.platformio\packages\tool-scons\script\..\engine\SCons\Environment.py", line 219:
    return self.method(*nargs, **kwargs)
  File "C:\users\peter\.platformio\penv\lib\site-packages\platformio\builder\tools\platformio.py", line 104:
    env.PrintConfiguration()
  File "C:\Users\Peter\.platformio\packages\tool-scons\script\..\engine\SCons\Environment.py", line 219:
    return self.method(*nargs, **kwargs)
  File "C:\users\peter\.platformio\penv\lib\site-packages\platformio\builder\tools\pioplatform.py", line 222:
    _get_plaform_data(),
  File "C:\users\peter\.platformio\penv\lib\site-packages\platformio\builder\tools\pioplatform.py", line 152:
    % (platform.title, pkg_metadata.version or platform.version)

Either pkg_metadata or platform must be None here – can you edit the python script and the line above and add a print statement to see what it sees?

Looking into my crystal ball there ma be something different about how the new version parses older platform manifests and thus it’s a core bug…

1 Like

Oh for the love of :face_with_symbols_over_mouth::face_with_symbols_over_mouth::face_with_symbols_over_mouth::face_with_symbols_over_mouth::face_with_symbols_over_mouth::face_with_symbols_over_mouth:

Nothing wrong with your crystal ball… or PlatformIO. Started up again for the day, tried it again after adding some print statements …

print("platform.title =", platform.title)
print("pkg_metadata.version =", pkg_metadata.version)
print("platform.version =", platform.version)

…and it behaved fine (except the print statements don’t show, but that seems to be a byproduct of how the code is put together… and when I removed the statements it worked fine as well. Bloody Windows! :face_vomiting: Sorry for the noise… should have followed the ‘Have you tried turning it off and on again’ step of troubleshooting first. :man_facepalming: :laughing:

What was even more frustrating/confusing was after this started being a little … sugar … I reinstated my side-by-side configuration of using VSCode Insider with the development/beta versions of the extension and platformio, and rolled my ‘regular’ vscode back to the release versions of the extension and platformio … and that behaved perfectly… making me think the alpha had broken something.