Ich habe die processHtml.py mal leicht angepasst, so dass die setuptools nachinstalliert werden, wenn sie nicht vorhanden sind:
Das klappt dann (erstmal) auch, jedoch wird Folgendes als Warnung angezeigt:
Installing collected packages: setuptools
Successfully installed setuptools-80.9.0
/Users/torsten/Development/Platformio/Projects/ESPuino/processHtml.py:29: UserWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html. The pkg_resources package is slated for removal as early as 2025-11-30. Refrain from using this package or pin to Setuptools<81.
Insofern macht’s eher keinen Sinn, dass ich hier jetzt noch einen Commit raushaue, wenn es bald dann obsolet wird. Daher scheint Importlib (hat mir ChatGPT als Alternative auch vorgeschlagen) wohl die bessere Alternative zu sein; habe die Lösung von @ajuko übernommen (Fehler beim Build pkg_resources' is not defined - #4 von Ajuko).
Ich laufe im Anschluss jedoch in folgenden Fehler.
Reading CMake configuration...
-- git rev-parse returned 'fatal: not a git repository (or any of the parent directories): .git'
-- Building ESP-IDF components for target esp32
-- Configuring incomplete, errors occurred!
fatal: not a git repository (or any of the parent directories): .git
CMake Error at /Users/torsten/.platformio/packages/framework-espidf/tools/cmake/build.cmake:620 (message):
Traceback (most recent call last):
File "<frozen runpy>", line 189, in _run_module_as_main
File "<frozen runpy>", line 112, in _get_module_details
File "/Users/torsten/.platformio/penv/.espidf-5.4.2/lib/python3.13/site-packages/idf_component_manager/__init__.py", line 6, in <module>
from idf_component_tools.environment import ComponentManagerSettings
File "/Users/torsten/.platformio/penv/.espidf-5.4.2/lib/python3.13/site-packages/idf_component_tools/__init__.py", line 9, in <module>
if ComponentManagerSettings().DEBUG_MODE:
~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/Users/torsten/.platformio/penv/.espidf-5.4.2/lib/python3.13/site-packages/pydantic_settings/main.py", line 193, in __init__
super().__init__(
~~~~~~~~~~~~~~~~^
**__pydantic_self__._settings_build_values(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...<27 lines>...
)
^
)
^
File "/Users/torsten/.platformio/penv/.espidf-5.4.2/lib/python3.13/site-packages/pydantic/main.py", line 250, in __init__
validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self)
File "/Users/torsten/.platformio/penv/.espidf-5.4.2/lib/python3.13/site-packages/idf_component_tools/environment.py", line 148, in fallback_to_default
if field.validation_alias:
^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'validation_alias'
Call Stack (most recent call first):
/Users/torsten/.platformio/packages/framework-espidf/tools/cmake/project.cmake:718 (idf_build_process)
CMakeLists.txt:3 (project)
Das scheint irgendwas pioarduino-spezisches zu sein, weil wenn ich in der platformio.ini die Plattform ändere auf
platform = https://github.com/pioarduino/platform-espressif32/releases/download/55.03.32/platform-espressif32.zip ; Arduino 3.3.2 (ESP-IDF 5.5.1)
dann kommt der Fehler nicht.
Hier der Commit dazu:
Übrigens wird als Extension jetzt auch pioarduino in VSC vorgeschlagen. Muss man auch mal testen, was das so kann.
