Erreur de compilation ... besoin d'aide

J'essaie ce sketch Arduino destiné à un ESP32-WROOM-32

A la compilation j'ai ce message :

exec: "python3": executable file not found in $PATH
Erreur de compilation pour la carte ESP32-WROOM-DA Module

Voici le sketch faisant appel au site météo ThingSpeak :

/*
  Rui Santos
  Complete project details at Complete project details at https://RandomNerdTutorials.com/esp32-http-get-open-weather-map-thingspeak-arduino/

  Permission is hereby granted, free of charge, to any person obtaining a copy
  of this software and associated documentation files.

  The above copyright notice and this permission notice shall be included in all
  copies or substantial portions of the Software.
*/

#include <WiFi.h>
#include <HTTPClient.h>

const char* ssid = "xxxxxxx";
const char* password = "xxxxxx";

// REPLACE WITH THINGSPEAK.COM API KEY
String serverName = "http://api.thingspeak.com/update?api_key=2W0CP5S47UEN4ACZ";
// EXAMPLE:
//String serverName = "http://api.thingspeak.com/update?api_key=7HQJM49R8JAPR";

// THE DEFAULT TIMER IS SET TO 10 SECONDS FOR TESTING PURPOSES
// For a final application, check the API call limits per hour/minute to avoid getting blocked/banned
unsigned long lastTime = 0;
// Timer set to 10 minutes (600000)
//unsigned long timerDelay = 600000;
// Set timer to 10 seconds (10000)
unsigned long timerDelay = 10000;

void setup() {
  Serial.begin(115200); 

  WiFi.begin(ssid, password);
  Serial.println("Connecting");
  while(WiFi.status() != WL_CONNECTED) {
    delay(500);
    Serial.print(".");
  }
  Serial.println("");
  Serial.print("Connected to WiFi network with IP Address: ");
  Serial.println(WiFi.localIP());
 
  Serial.println("Timer set to 10 seconds (timerDelay variable), it will take 10 seconds before publishing the first reading.");
  
  // Random seed is a number used to initialize a pseudorandom number generator
  randomSeed(analogRead(33));
}

void loop() {
  // Send an HTTP GET request
  if ((millis() - lastTime) > timerDelay) {
    // Check WiFi connection status
    if(WiFi.status()== WL_CONNECTED){
      WiFiClient client;
      HTTPClient http;

      String serverPath = serverName + "&field1=" + String(random(40));
      
      // Your Domain name with URL path or IP address with path
      http.begin(client, serverPath.c_str());
      
      // Send HTTP GET request
      int httpResponseCode = http.GET();
      
      if (httpResponseCode>0) {
        Serial.print("HTTP Response code: ");
        Serial.println(httpResponseCode);
        String payload = http.getString();
        Serial.println(payload);
      }
      else {
        Serial.print("Error code: ");
        Serial.println(httpResponseCode);
      }
      // Free resources
      http.end();
    }
    else {
      Serial.println("WiFi Disconnected");
    }
    lastTime = millis();
  }
}

Evite de lettre ton mot de passe en clair sur un forum... édite ton post et modifie le...

Ton erreur doit venir d'une mauvaise installation de l'IDE Arduino. Tu es sous Windows, Linux ?
En tout cas, je pense que tu devrais la désinstaller et la réinstaller.

Tu as raison pour les données
Je suis sur Mac et la version de l'arduino estla dernière 1.8.19
J'ai compilé avec succès des tas de sketchs ... tu penses que cela vient vraiment de là?

Sur Mac, je ne connais pas. Attends que ceux qui en ont un répondent...

Rien à voir avec le sketch.
Le message d'erreur est pourtant évident :

Ce site en donne une cause mais après vérification la phrase dans platforme.txt est correcte
https://georgik.rocks/esp32-arduino-macos-exec-python-executable-file-not-found-in-path/


name=ESP32 Arduino
version=

runtime.tools.xtensa-esp32s3-elf-gcc.path={runtime.platform.path}/tools/xtensa-esp32s3-elf
runtime.tools.riscv32-esp-elf-gcc.path={runtime.platform.path}/tools/riscv32-esp-elf

tools.esptool_py.path={runtime.tools.esptool_py.path}
tools.esptool_py.cmd=esptool
tools.esptool_py.cmd.linux=esptool.py
tools.esptool_py.cmd.windows=esptool.exe

tools.esptool_py.network_cmd=python3 "{runtime.platform.path}/tools/espota.py" -r
tools.esptool_py.network_cmd.windows="{runtime.platform.path}/tools/espota.exe" -r

tools.esp_ota.cmd=python3 "{runtime.platform.path}/tools/espota.py" -r
tools.esp_ota.cmd.windows="{runtime.platform.path}/tools/espota.exe" -r

tools.gen_esp32part.cmd=python3 "{runtime.platform.path}/tools/gen_esp32part.py"
tools.gen_esp32part.cmd.windows="{runtime.platform.path}/tools/gen_esp32part.exe"

compiler.path={runtime.tools.{build.tarch}-{build.target}-elf-gcc.path}/bin/
compiler.sdk.path={runtime.platform.path}/tools/sdk/{build.mcu}
compiler.prefix={build.tarch}-{build.target}-elf-

Sauf que là justement il te dit qu'il ne trouve pas l'exécutable python3.
Dans ton cas, il semblerait plutôt qu'une plus ancienne version de python soit installée et qu'il faille retirer le 3.

SUPER ... bien vu .. ça fonctionne maintenant .... Merci!

D'où vient cette vieille version de Python? ... j'ai pourtant la dernière version d'Arduino .. ce n'est pas lié?

Python n'est pas installé avec l'IDE Arduino. Ou bien c'est celui de la machine ou bien il est installé lorsque tu installes le support de l'ESP8266.

Je viens de regarder dans arduino15/packages et je n'ai pas l'impression que python fasse partie de l'installation.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.