Open
Description
Operating System
MacOS
IDE version
Clion 2024 / Platformio 6.1.18
Board
ESP32dev
Description
After adding adafruit/Adafruit SPIFlash@^4.0.0 to lib_deps, platformio project cant be loaded. I am reloading to initialize project but I get errors. When I removed library from lib_deps there is no issue.
There is also no problem to attach source files from github, but loading library from ini is not possible.
I reported this issue in library repo, but they told me that this is platofmio issue. adafruit/Adafruit_SPIFlash#189 (comment)
How to reproduce ?
- Install platformio
- Create platformio esp32 project
- Add library to lib_deps
- Reload project
/opt/homebrew/bin/pio project config --json-output
/opt/homebrew/bin/pio project metadata --json-output -e esp32dev --json-output-path /private/var/folders/nm/27zh2hwj563cp2mp4qgxwwkm0000gn/T/pio.json
AttributeError: Traceback (most recent call last):
File "/opt/homebrew/Cellar/platformio/6.1.18_1/libexec/lib/python3.13/site-packages/platformio/main.py", line 103, in main
cli() # pylint: disable=no-value-for-parameter
~~~^^
File "/opt/homebrew/Cellar/platformio/6.1.18_1/libexec/lib/python3.13/site-packages/click/core.py", line 1157, in call
return self.main(*args, **kwargs)
~~~~~~~~~^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/platformio/6.1.18_1/libexec/lib/python3.13/site-packages/click/core.py", line 1078, in main
rv = self.invoke(ctx)
File "/opt/homebrew/Cellar/platformio/6.1.18_1/libexec/lib/python3.13/site-packages/platformio/cli.py", line 85, in invoke
return super().invoke(ctx)
~~~~~~~~~~~~~~^^^^^
File "/opt/homebrew/Cellar/platformio/6.1.18_1/libexec/lib/python3.13/site-packages/click/core.py", line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
File "/opt/homebrew/Cellar/platformio/6.1.18_1/libexec/lib/python3.13/site-packages/click/core.py", line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
File "/opt/homebrew/Cellar/platformio/6.1.18_1/libexec/lib/python3.13/site-packages/click/core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/platformio/6.1.18_1/libexec/lib/python3.13/site-packages/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
File "/opt/homebrew/Cellar/platformio/6.1.18_1/libexec/lib/python3.13/site-packages/platformio/project/commands/metadata.py", line 45, in project_metadata_cmd
build_metadata = load_build_metadata(project_dir, environments)
File "/opt/homebrew/Cellar/platformio/6.1.18_1/libexec/lib/python3.13/site-packages/platformio/project/helpers.py", line 153, in load_build_metadata
_load_build_metadata(project_dir, missed_env_names, build_type)
~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/platformio/6.1.18_1/libexec/lib/python3.13/site-packages/platformio/project/helpers.py", line 183, in _load_build_metadata
raise result.exception
File "/opt/homebrew/Cellar/platformio/6.1.18_1/libexec/lib/python3.13/site-packages/click/testing.py", line 408, in invoke
return_value = cli.main(args=args or (), prog_name=prog_name, **extra)
File "/opt/homebrew/Cellar/platformio/6.1.18_1/libexec/lib/python3.13/site-packages/click/core.py", line 1078, in main
rv = self.invoke(ctx)
File "/opt/homebrew/Cellar/platformio/6.1.18_1/libexec/lib/python3.13/site-packages/click/core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/platformio/6.1.18_1/libexec/lib/python3.13/site-packages/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
File "/opt/homebrew/Cellar/platformio/6.1.18_1/libexec/lib/python3.13/site-packages/click/decorators.py", line 33, in new_func
return f(get_current_context(), *args, **kwargs)
File "/opt/homebrew/Cellar/platformio/6.1.18_1/libexec/lib/python3.13/site-packages/platformio/run/cli.py", line 147, in cli
process_env(
~~~~~~~~~~~^
ctx,
^^^^
...<9 lines>...
verbose,
^^^^^^^^
)
^
File "/opt/homebrew/Cellar/platformio/6.1.18_1/libexec/lib/python3.13/site-packages/platformio/run/cli.py", line 210, in process_env
).process()
~~~~~~~^^
File "/opt/homebrew/Cellar/platformio/6.1.18_1/libexec/lib/python3.13/site-packages/platformio/run/processor.py", line 81, in process
install_project_env_dependencies(
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
self.name,
^^^^^^^^^^
...<3 lines>...
},
^^
)
^
File "/opt/homebrew/Cellar/platformio/6.1.18_1/libexec/lib/python3.13/site-packages/platformio/package/commands/install.py", line 133, in install_project_env_dependencies
_install_project_env_libraries(project_env, options),
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/platformio/6.1.18_1/libexec/lib/python3.13/site-packages/platformio/package/commands/install.py", line 252, in _install_project_env_libraries
env_lm.install(
~~~~~~~~~~~~~~^
spec,
^^^^^
skip_dependencies=options.get("skip_dependencies"),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
force=options.get("force"),
^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "/opt/homebrew/Cellar/platformio/6.1.18_1/libexec/lib/python3.13/site-packages/platformio/package/manager/_install.py", line 47, in install
pkg = self._install(spec, skip_dependencies=skip_dependencies, force=force)
File "/opt/homebrew/Cellar/platformio/6.1.18_1/libexec/lib/python3.13/site-packages/platformio/package/manager/_install.py", line 130, in _install
self.install_dependencies(pkg)
~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^
File "/opt/homebrew/Cellar/platformio/6.1.18_1/libexec/lib/python3.13/site-packages/platformio/package/manager/_install.py", line 143, in install_dependencies
self.install_dependency(dependency)
~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^
File "/opt/homebrew/Cellar/platformio/6.1.18_1/libexec/lib/python3.13/site-packages/platformio/package/manager/library.py", line 89, in install_dependency
not_builtin_conds.append(not self.is_builtin_lib(spec.name))
~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^
File "/opt/homebrew/Cellar/platformio/6.1.18_1/libexec/lib/python3.13/site-packages/platformio/package/manager/library.py", line 120, in is_builtin_lib
for storage in cls.get_builtin_libs():
~~~~~~~~~~~~~~~~~~~~^^
File "/opt/homebrew/Cellar/platformio/6.1.18_1/libexec/lib/python3.13/site-packages/platformio/util.py", line 57, in wrapper
self.cache[key] = (time.time(), func(*args, **kwargs))
~~~~^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/platformio/6.1.18_1/libexec/lib/python3.13/site-packages/platformio/package/manager/library.py", line 105, in get_builtin_libs
for storage in p.get_lib_storages():
~~~~~~~~~~~~~~~~~~^^
File "/opt/homebrew/Cellar/platformio/6.1.18_1/libexec/lib/python3.13/site-packages/platformio/platform/base.py", line 223, in get_lib_storages
for opts in (self.frameworks or {}).values():
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'list' object has no attribute 'values'
============================================================
An unexpected error occurred. Further steps:
Verify that you have the latest version of PlatformIO using
python -m pip install -U platformio command
Try to find answer in FAQ Troubleshooting section
https://docs.platformio.org/page/faq/index.html
Report this problem to the developers
https://github.com/platformio/platformio-core/issues
============================================================