PlatformIO Community

Can't get Platforms update + Could not load installed platforms + Could not load boards list


#1

Hello !
Upon clicking on Platforms update I receive this pop-up:
Could not load platform updates

PIO Core Call Error: "Error: Traceback (most recent call last):\n  File \"/home/george/.platformio/penv/local/lib/python2.7/site-packages/platformio/__main__.py\", line 120, in main\n    cli(None, None, None)\n  File \"/home/george/.platformio/penv/local/lib/python2.7/site-packages/click/core.py\", line 700, in __call__\n    return self.main(*args, **kwargs)\n  File \"/home/george/.platformio/penv/local/lib/python2.7/site-packages/click/core.py\", line 680, in main\n    rv = self.invoke(ctx)\n  File \"/home/george/.platformio/penv/local/lib/python2.7/site-packages/click/core.py\", line 1027, in invoke\n    return _process_result(sub_ctx.command.invoke(sub_ctx))\n  File \"/home/george/.platformio/penv/local/lib/python2.7/site-packages/click/core.py\", line 1027, in invoke\n    return _process_result(sub_ctx.command.invoke(sub_ctx))\n  File \"/home/george/.platformio/penv/local/lib/python2.7/site-packages/click/core.py\", line 873, in invoke\n    return ctx.invoke(self.callback, **ctx.params)\n  File \"/home/george/.platformio/penv/local/lib/python2.7/site-packages/click/core.py\", line 508, in invoke\n    return callback(*args, **kwargs)\n  File \"/home/george/.platformio/penv/local/lib/python2.7/site-packages/platformio/commands/platform.py\", line 369, in platform_update\n    pkg_dir).are_outdated_packages()):\n  File \"/home/george/.platformio/penv/local/lib/python2.7/site-packages/platformio/managers/platform.py\", line 250, in newPlatform\n    _instance = platform_cls(join(platform_dir, \"platform.json\"))\n  File \"/home/george/.platformio/penv/local/lib/python2.7/site-packages/platformio/managers/platform.py\", line 460, in __init__\n    self._manifest = util.load_json(manifest_path)\n  File \"/home/george/.platformio/penv/local/lib/python2.7/site-packages/platformio/util.py\", line 185, in load_json\n    with open(file_path, \"r\") as f:\nIOError: [Errno 2] No such file or directory: '/home/george/.platformio/platforms/arduino-esp32/platform.json'\n\n============================================================\n\nAn unexpected error occurred. Further steps:\n\n* Verify that you have the latest version of PlatformIO using\n  `pip install -U platformio` command\n\n* Try to find answer in FAQ Troubleshooting section\n  https://docs.platformio.org/page/faq.html\n\n* Report this problem to the developers\n  https://github.com/platformio/platformio-core/issues\n\n============================================================"

Upon clicking on Platforms -> Installed I get:
Could not load installed platforms

PIO Core Call Error: "Error: Traceback (most recent call last):\n  File \"/home/george/.platformio/penv/local/lib/python2.7/site-packages/platformio/__main__.py\", line 120, in main\n    cli(None, None, None)\n  File \"/home/george/.platformio/penv/local/lib/python2.7/site-packages/click/core.py\", line 700, in __call__\n    return self.main(*args, **kwargs)\n  File \"/home/george/.platformio/penv/local/lib/python2.7/site-packages/click/core.py\", line 680, in main\n    rv = self.invoke(ctx)\n  File \"/home/george/.platformio/penv/local/lib/python2.7/site-packages/click/core.py\", line 1027, in invoke\n    return _process_result(sub_ctx.command.invoke(sub_ctx))\n  File \"/home/george/.platformio/penv/local/lib/python2.7/site-packages/click/core.py\", line 1027, in invoke\n    return _process_result(sub_ctx.command.invoke(sub_ctx))\n  File \"/home/george/.platformio/penv/local/lib/python2.7/site-packages/click/core.py\", line 873, in invoke\n    return ctx.invoke(self.callback, **ctx.params)\n  File \"/home/george/.platformio/penv/local/lib/python2.7/site-packages/click/core.py\", line 508, in invoke\n    return callback(*args, **kwargs)\n  File \"/home/george/.platformio/penv/local/lib/python2.7/site-packages/platformio/commands/platform.py\", line 223, in platform_list\n    expose_packages=False))\n  File \"/home/george/.platformio/penv/local/lib/python2.7/site-packages/platformio/commands/platform.py\", line 79, in _get_installed_platform_data\n    p = PlatformFactory.newPlatform(platform)\n  File \"/home/george/.platformio/penv/local/lib/python2.7/site-packages/platformio/managers/platform.py\", line 250, in newPlatform\n    _instance = platform_cls(join(platform_dir, \"platform.json\"))\n  File \"/home/george/.platformio/penv/local/lib/python2.7/site-packages/platformio/managers/platform.py\", line 460, in __init__\n    self._manifest = util.load_json(manifest_path)\n  File \"/home/george/.platformio/penv/local/lib/python2.7/site-packages/platformio/util.py\", line 185, in load_json\n    with open(file_path, \"r\") as f:\nIOError: [Errno 2] No such file or directory: '/home/george/.platformio/platforms/arduino-esp32/platform.json'\n\n============================================================\n\nAn unexpected error occurred. Further steps:\n\n* Verify that you have the latest version of PlatformIO using\n  `pip install -U platformio` command\n\n* Try to find answer in FAQ Troubleshooting section\n  https://docs.platformio.org/page/faq.html\n\n* Report this problem to the developers\n  https://github.com/platformio/platformio-core/issues\n\n============================================================"

Upon clicking on Boards I get:
Could not load boards list

PIO Core Call Error: "Error: Traceback (most recent call last):\n  File \"/home/george/.platformio/penv/local/lib/python2.7/site-packages/platformio/__main__.py\", line 120, in main\n    cli(None, None, None)\n  File \"/home/george/.platformio/penv/local/lib/python2.7/site-packages/click/core.py\", line 700, in __call__\n    return self.main(*args, **kwargs)\n  File \"/home/george/.platformio/penv/local/lib/python2.7/site-packages/click/core.py\", line 680, in main\n    rv = self.invoke(ctx)\n  File \"/home/george/.platformio/penv/local/lib/python2.7/site-packages/click/core.py\", line 1027, in invoke\n    return _process_result(sub_ctx.command.invoke(sub_ctx))\n  File \"/home/george/.platformio/penv/local/lib/python2.7/site-packages/click/core.py\", line 873, in invoke\n    return ctx.invoke(self.callback, **ctx.params)\n  File \"/home/george/.platformio/penv/local/lib/python2.7/site-packages/click/core.py\", line 508, in invoke\n    return callback(*args, **kwargs)\n  File \"/home/george/.platformio/penv/local/lib/python2.7/site-packages/platformio/commands/boards.py\", line 29, in cli\n    return _print_boards_json(query, installed)\n  File \"/home/george/.platformio/penv/local/lib/python2.7/site-packages/platformio/commands/boards.py\", line 81, in _print_boards_json\n    for board in _get_boards(installed):\n  File \"/home/george/.platformio/penv/local/lib/python2.7/site-packages/platformio/commands/boards.py\", line 76, in _get_boards\n    return pm.get_installed_boards() if installed else pm.get_all_boards()\n  File \"/home/george/.platformio/penv/local/lib/python2.7/site-packages/platformio/managers/platform.py\", line 181, in get_all_boards\n    boards = self.get_installed_boards()\n  File \"/home/george/.platformio/penv/local/lib/python2.7/site-packages/platformio/util.py\", line 138, in wrapper\n    self.cache[key] = (time.time(), func(*args, **kwargs))\n  File \"/home/george/.platformio/penv/local/lib/python2.7/site-packages/platformio/managers/platform.py\", line 168, in get_installed_boards\n    p = PlatformFactory.newPlatform(manifest['__pkg_dir'])\n  File \"/home/george/.platformio/penv/local/lib/python2.7/site-packages/platformio/managers/platform.py\", line 250, in newPlatform\n    _instance = platform_cls(join(platform_dir, \"platform.json\"))\n  File \"/home/george/.platformio/penv/local/lib/python2.7/site-packages/platformio/managers/platform.py\", line 460, in __init__\n    self._manifest = util.load_json(manifest_path)\n  File \"/home/george/.platformio/penv/local/lib/python2.7/site-packages/platformio/util.py\", line 185, in load_json\n    with open(file_path, \"r\") as f:\nIOError: [Errno 2] No such file or directory: '/home/george/.platformio/platforms/arduino-esp32/platform.json'\n\n============================================================\n\nAn unexpected error occurred. Further steps:\n\n* Verify that you have the latest version of PlatformIO using\n  `pip install -U platformio` command\n\n* Try to find answer in FAQ Troubleshooting section\n  https://docs.platformio.org/page/faq.html\n\n* Report this problem to the developers\n  https://github.com/platformio/platformio-core/issues\n\n============================================================"

#2

I would advise to delete the entire /home/george/.platformio/platforms/arduino-esp32 folder. It is a relict of your previous try to change the platform and doesn’t work anyway. (You can also freely delete any other folder in /platforms/, PIO will re-download them as needed)


#3

OMG, YES !
I like this resolve !

And it worked !
Thanks a lot, mate !