Missing SConscript file platformio-build.py

Hi, I hope someone can help me. I’m trying to compile tasmota on an esp32. When I build my project I get the following error.

*** missing SConscript file 'C:\\Users\\mikec\\.platformio\\packages\\framework-arduinoespressif32\\tools\\platformio-build.py' File "C:\Users\mikec\.platformio\platforms\espressif32\builder\frameworks\arduino.py", line 49, in <module>

I’ve compiled many times on an ESP8266, but this is my first ESP32.

In the platform_override.ini file, I commented out the tasmota line and uncomment tasmota32. I also removed the comments from the [env:tasmota32_base] section.

Not sure what else is missing

Close VSC (if using) search hidden folder .platformio delete anything in folder packages do not delete the penv folder if existing.
Run Platformio / VSC wait and follow messages. Fixed.

Thank you for the quick response. After delete the contents of the packages folder (penv was not in the folder), and restarting VSC and opening my project, I get the following error now.

Resolving tasmota32 dependencies…

Tool Manager: Installing tasmota/framework-arduinoespressif32

UnknownPackageError: Could not find the package with ‘tasmota/framework-arduinoespressif32’ requirements for your system ‘windows_amd64’

I was able to resolve this error by creating a new project with and ESP32. I then close the project and VCS and then reopened VCS and my original project, after that the packages folder was repopulated.

I rebuilt my project but I still get the original error:

*** missing SConscript file 'C:\\Users\\mikec\\.platformio\\packages\\framework-arduinoespressif32\\tools\\platformio-build.py' File "C:\Users\mikec\.platformio\platforms\espressif32\builder\frameworks\arduino.py", line 49, in <module>

What’s your platformio.ini?

Here it is.

[platformio]
description = Provide ESP8266 / ESP32 based devices with Web, MQTT and OTA firmware
src_dir = tasmota
lib_dir = lib/default
boards_dir = boards
build_cache_dir = .cache
extra_configs = platformio_tasmota32.ini
platformio_tasmota_env.ini
platformio_tasmota_env32.ini
platformio_override.ini
platformio_tasmota_cenv.ini

[common]
platform = ${core.platform}
platform_packages = ${core.platform_packages}
framework = arduino
board = esp8266_1M
board_build.filesystem = littlefs
board_build.variants_dir = variants/tasmota
custom_unpack_dir = unpacked_littlefs
build_unflags = ${core.build_unflags}
build_flags = ${core.build_flags}
monitor_speed = 115200
monitor_echo = yes
; *** Upload Serial reset method for Wemos and NodeMCU
upload_resetmethod = nodemcu
check_skip_packages = yes
extra_scripts = ${esp_defaults.extra_scripts}
lib_archive = no
lib_ldf_mode = chain
lib_compat_mode = strict
shared_libdeps_dir = lib
lib_extra_dirs =
lib/lib_basic
lib/lib_i2c
lib/lib_display
lib/lib_ssl
lib/lib_audio
lib/lib_rf
lib/lib_div

[tasmota]
; Uncomment if you do NOT want gzipped map file(s)
;disable_map_gz = 1
; Uncomment and specify a folder where to place the map file(s) (default set to folder build_output)
;map_dir = /tmp/map_files/
; Uncomment if you do NOT want additionally gzipped firmware file(s) at all
;disable_bin_gz = 1
; Uncomment if you want additionally gzipped esp32x firmware file(s)
;enable_esp32_gz = 1
; Uncomment and specify a folder where to place the firmware file(s) (default set to folder build_output)
;bin_dir = /tmp/bin_files/
; Global build flags (used for all env) can be overridden in “platformio_override.ini”
build_unflags =
build_flags =

[scripts_defaults]
extra_scripts = pre:pio-tools/pre_source_dir.py
pre:pio-tools/set_partition_table.py
pre:pio-tools/override_copy.py
pre:pio-tools/compress-html.py
pre:pio-tools/port-vsc.py
post:pio-tools/strip-flags.py

[esp_defaults]
extra_scripts = post:pio-tools/name-firmware.py
post:pio-tools/gzip-firmware.py
post:pio-tools/metrics-firmware.py
post:pio-tools/custom_target.py
; post:pio-tools/obj-dump.py
${scripts_defaults.extra_scripts}
; *** remove undesired all warnings
build_unflags = ${tasmota.build_unflags}
-Wall
; -mtarget-align
-Wdeprecated-declarations
build_flags = ${tasmota.build_flags}
-DCORE_DEBUG_LEVEL=0
-Wl,-Map,firmware.map
-Wno-deprecated-declarations
; -mno-target-align
-mtarget-align
-free
-fipa-pta
-Wreturn-type
-DTASMOTA ; flag indicating that we are compiling Tasmota
; *********************************************************************
; *** Use custom settings from file user_config_override.h
-DUSE_CONFIG_OVERRIDE
; *********************************************************************

[esp82xx_defaults]
extra_scripts = ${esp_defaults.extra_scripts}
build_flags = ${esp_defaults.build_flags}
-DNDEBUG
-DFP_IN_IROM
-DBEARSSL_SSL_BASIC
; NONOSDK22x_190703 = 2.2.2-dev(38a443e)
-DPIO_FRAMEWORK_ARDUINO_ESPRESSIF_SDK22x_190703
-DPIO_FRAMEWORK_ARDUINO_LWIP2_HIGHER_BANDWIDTH_LOW_FLASH
; -DPIO_FRAMEWORK_ARDUINO_LWIP2_IPV6_HIGHER_BANDWIDTH -DUSE_IPV6 ; enables IPv6
; VTABLES in Flash
-DVTABLES_IN_FLASH
; remove the 4-bytes alignment for PSTR()
-DPSTR_ALIGN=1
; restrict to minimal mime-types
-DMIMETYPE_MINIMAL
; uncomment the following to enable TLS with 4096 RSA certificates
;-DUSE_4K_RSA
lib_ignore = ESP8266Audio
ESP8266SAM
ESP8266LLMNR
ESP8266NetBIOS
ESP8266SSDP
ESP8266WiFiMesh
GDBStub
ESP8266HTTPUpdateServer
SPISlave
Hash
; Disable next if you want to use ArduinoOTA in Tasmota (default disabled)
ArduinoOTA

[core]
; *** Esp8266 Tasmota modified Arduino core based on core 2.7.4. Added Backport for PWM selection
platform = https://github.com/tasmota/platform-espressif8266/releases/download/2025.05.00/platform-espressif8266.zip
platform_packages =
build_unflags = ${esp_defaults.build_unflags}
build_flags = ${esp82xx_defaults.build_flags}
; *** Use ONE of the two PWM variants. Tasmota default is Locked PWM
;-DWAVEFORM_LOCKED_PHASE
-DWAVEFORM_LOCKED_PWM

I did not change anything in the platformio.ini. I only changed the platformio_override.ini file, which is below:

[platformio]
; For best Gitpod performance remove the “;” in the next line. Needed Platformio files are cached and installed at first run
;core_dir = .platformio
; For unrelated compile errors with Windows it can help to shorten Platformio project path
;workspace_dir = c:.pio
;extra_configs = platformio_tasmota_user_env.ini

; *** Build/upload environment
default_envs =
; *** Uncomment the line(s) below to select version(s)
; tasmota
; tasmota-debug
; tasmota-minimal
; tasmota-lite
; tasmota-knx
; tasmota-sensors
; tasmota-display
; tasmota-zbbridge
; tasmota-ir
tasmota32
; tasmota32solo1
; tasmota32s2
; tasmota32s2cdc
; tasmota32s3
; tasmota32c2
; tasmota32c3
; tasmota32c6
; tasmota32-zbbrdgpro
; tasmota32-bluetooth
; tasmota32-webcam
; tasmota32-knx
; tasmota32-lvgl
; tasmota32-ir
; tasmota32-nspanel
; tasmota32c3ser
; tasmota32c6ser
; tasmota32s3ser

[tasmota]
; *** Global build / unbuild compile time flags for ALL Tasmota / Tasmota32 [env]
;build_unflags =
build_flags = -DUSE_BERRY_PARTITION_WIZARD

[env]
;build_unflags = ${common.build_unflags}
; -Wswitch-unreachable
;build_flags = ${common.build_flags}
; -DF_CRYSTAL=26000000
; -Wno-switch-unreachable
; *** Optional Debug messages
; -DDEBUG_TASMOTA_CORE
; -DDEBUG_TASMOTA_DRIVER
; -DDEBUG_TASMOTA_SENSOR
; Build variant 1MB = 1MB firmware no filesystem (default)
;board = ${common.board}
; Build variant 2MB = 1MB firmware, 1MB filesystem (most Shelly devices)
;board = esp8266_2M1M
; Build variant 4MB = 1MB firmware, 1MB OTA, 2MB filesystem (WEMOS D1 Mini, NodeMCU, Sonoff POW)
;board = esp8266_4M2M
;board_build.f_cpu = 160000000L
;board_build.f_flash = 80000000L
; *** Define serial port used for erasing/flashing/terminal
;upload_port = COM4
;monitor_port = COM4
lib_extra_dirs = ${library.lib_extra_dirs}

[env:tasmota32_base]
; *** Uncomment next lines “;” to enable development Tasmota Arduino version ESP32
platform = https://github.com/Jason2866/platform-espressif32/releases/download/2024.07.22/platform-espressif32.zip

platform_packages = framework-arduinoespressif32 @
build_unflags = ${esp32_defaults.build_unflags}
build_flags = ${esp32_defaults.build_flags}
board = esp32dev
board_build.f_cpu = 240000000L
board_build.f_flash = 80000000L
board_build.flash_mode = qio
board_build.flash_size = 8MB
board_upload.maximum_size = 8388608
board_upload.arduino.flash_extra_images =
board_build.partitions = partitions/esp32_partition_app2944k_fs2M.csv
; *** Serial port used for erasing/flashing the ESP32
upload_port = COM3
monitor_port = COM3
upload_speed = 115200
monitor_speed = 115200
upload_resetmethod = ${common.upload_resetmethod}
lib_extra_dirs = ${library.lib_extra_dirs}
; *** ESP32 lib. ALWAYS needed for ESP32 !!!
lib/libesp32
; *** comment the following line if you dont use LVGL in a Tasmota32 build. Reduces compile time
lib/libesp32_lvgl
; *** uncomment the following line if you use Bluetooth or Apple Homekit in a Tasmota32 build. Reduces compile time
lib/libesp32_div
; *** uncomment the following line if you use Epaper driver epidy in your Tasmota32 build. Reduces compile time
; lib/libesp32_eink

[library]
shared_libdeps_dir = lib
; *** Library disable / enable for variant Tasmota(32). Disable reduces compile time
; *** !!! Disabling needed libs will generate compile errors !!!
; *** The resulting firmware will NOT be different if you leave all libs enabled
; *** Disabling by putting a “;” in front of the lib name
; *** If you dont know what it is all about, do not change
lib_extra_dirs =
; *** Only disabled for Tasmota minimal and Tasmota light. For all other variants needed!
lib/lib_basic
; **** I2C devices. Most sensors. Disable only if you dont have ANY I2C device enabled
lib/lib_i2c
; *** Displays. Disable if you dont have any Display activated
lib/lib_display
; *** Bear SSL and base64. Disable if you dont have SSL or TLS activated
lib/lib_ssl
; *** Audio needs a lot of time to compile. Mostly not used functions. Recommended to disable
lib/lib_audio
; *** RF 433 stuff (not RF Bridge). Recommended to disable
lib/lib_rf
; *** Mostly not used functions. Recommended to disable
lib/lib_div

Delete your override file. It has many changes. This breaks your compile

If I delete the platformio_override.ini does that mean I have to set the board in platformio.ini
so change …

board = esp8266_1M

to

board = esp32dev

Easier to select the wanted env with VSC menu. No change in any file needed

After trying many things, I ended up uninstalling the platformio plugin, deleting the .platformio folder from my user directory, and starting with fresh tasmota project. The first compile took a while to complete, but in the end it build and uploaded to my ESP32. :100:

Thanks to everyone that helped, it is much appreciated.