[Errno 2] No such file or directory:

I'm getting this error each time i try to upload a sketch

Flashing with command:C:/Users/berze/.arduino-create/esp32/esptool_py/4.5.1/esptool.exe --chip esp32 --port COM3 --baud 921600 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 80m --flash_size 4MB 0x1000 C:/Users/berze/AppData/Local/Temp/extrafiles1281502562/POTENCIA_dec11a.bootloader.bin 0x8000 C:/Users/berze/AppData/Local/Temp/extrafiles1281502562/POTENCIA_dec11a.partitions.bin 0xe000 C:/Users/berze/AppData/Local/Temp/extrafiles1281502562/tools/partitions/boot_app0.bin 0x10000 C:/Users/berze/AppData/Local/Temp/arduino-create-agent1945883738/POTENCIA_dec11a.bin
usage: esptool write_flash [-h] [--erase-all]
                           [--flash_freq {keep,80m,60m,48m,40m,30m,26m,24m,20m,16m,15m,12m}]
                           [--flash_mode {keep,qio,qout,dio,dout}]
                           [--flash_size {detect,keep,256KB,512KB,1MB,2MB,2MB-c1,4MB,4MB-c1,8MB,16MB,32MB,64MB,128MB}]
                           [--spi-connection SPI_CONNECTION] [--no-progress]
                           [--verify] [--encrypt]
                           [--encrypt-files <address> <filename> [<address> <filename> ...]]
                           [--ignore-flash-encryption-efuse-setting] [--force]
                           [--compress | --no-compress]
                           <address> <filename> [<address> <filename> ...]
esptool write_flash: error: argument <address> <filename>: [Errno 2] No such file or directory: 'C:/Users/berze/AppData/Local/Temp/extrafiles1281502562/POTENCIA_dec11a.bootloader.bin'
Executing command: exit status 2

this is the code im trying to upload:

/* 
  Sketch generated by the Arduino IoT Cloud Thing "Untitled"
  https://create.arduino.cc/cloud/things/72aad8c3-b503-4801-982c-051a15eddf45 

  Arduino IoT Cloud Variables description

  The following variables are automatically generated and updated when changes are made to the Thing

  float freq_Fase_A;
  float freq_Fase_B;
  float freq_Fase_C;
  bool outRele;
  bool relevador;

  Variables which are marked as READ/WRITE in the Cloud Thing will also have functions
  which are called when their values are changed from the Dashboard.
  These functions are generated with the Thing and added at the end of this sketch.
*/

#include "thingProperties.h"

#define IN_FASE_A 25
#define IN_FASE_B 26
#define IN_FASE_C 27


void TaskFreq();

void contarFreqA();
void contarFreqB();
void contarFreqC();

const unsigned long intervaloMedicion = 1000;  // Intervalo de medición en milisegundos
volatile int contadorCambiosA = 0, contadorCambiosB = 0, contadorCambiosC = 0;  // Contador de cambios de estado (volátil para uso en interrupciones)
unsigned long tiempoActual, tiempoAnterior = 0 ;
bool fasesListas = false;

void setup() {
  
  // Initialize serial and wait for port to open:
  Serial.begin(9600);
  // This delay gives the chance to wait for a Serial Monitor without blocking if none is found
  delay(1500); 
  
  pinMode(IN_FASE_A, INPUT);
  pinMode(IN_FASE_B, INPUT);
  pinMode(IN_FASE_C, INPUT);
  pinMode(2, OUTPUT);

  attachInterrupt(digitalPinToInterrupt(IN_FASE_A), contarFreqA, RISING);
  attachInterrupt(digitalPinToInterrupt(IN_FASE_B), contarFreqB, RISING);
  attachInterrupt(digitalPinToInterrupt(IN_FASE_C), contarFreqC, RISING);

  //xTaskCreate(TaskFreqA, "TFA", 1024, NULL, 1, NULL);     // Core 1
  //xTaskCreate(TaskFreqB, "TFB", 1024, NULL, 1, NULL);     // Core 1
  //xTaskCreate(TaskFreqC, "TFC", 1024, NULL, 1, NULL);     // Core 1
  
  // Defined in thingProperties.h
  initProperties();

  // Connect to Arduino IoT Cloud
  ArduinoCloud.begin(ArduinoIoTPreferredConnection);
  
  /*
     The following function allows you to obtain more information
     related to the state of network and IoT Cloud connection and errors
     the higher number the more granular information you’ll get.
     The default is 0 (only errors).
     Maximum is 4
 */
  setDebugMessageLevel(2);
  ArduinoCloud.printDebugInfo();
}

void loop() {
  ArduinoCloud.update();
  // Your code here 
  tiempoActual = millis();
  TaskFreq(); 
}

void onRelevadorChange()  {
  if (freq_Fase_A > 59 && freq_Fase_B > 59 && freq_Fase_C > 59){
    digitalWrite(2, HIGH);
    outRele = true;
  }
}

void contarFreqA(){
  contadorCambiosA++;
}

void contarFreqB(){
  contadorCambiosB++;
}

void contarFreqC(){
  contadorCambiosC++;
}

void TaskFreq(){
  if (tiempoActual - tiempoAnterior >= intervaloMedicion) {
    //float freq_Fase_A = (float)contadorCambiosA * 1000 / intervaloMedicion;  // Cálculo de la frecuencia
    freq_Fase_A = 60;
    //float freq_Fase_B = (float)contadorCambiosB * 1000 / intervaloMedicion;  // Cálculo de la frecuencia
    freq_Fase_B = 60;
    //float freq_Fase_C = (float)contadorCambiosC * 1000 / intervaloMedicion;  // Cálculo de la frecuencia
    freq_Fase_C = 60;
    contadorCambiosA = 0;  // Reinicia el contador
    contadorCambiosB = 0;  // Reinicia el contador
    contadorCambiosC = 0;  // Reinicia el contador
    tiempoAnterior = tiempoActual;
  }
  vTaskDelay(100 / portTICK_PERIOD_MS);
}






Hi @felix_d_guzman. This bug has been reported to the Arduino Cloud developers I'll let you know if I receive any news from them about a resolution.

Until then, I can suggest using Arduino IDE as a workaround.

Arduino IDE has Arduino Cloud integration, which provides convenient access to the sketches from your Arduino Cloud account.

I'll provide instructions you can follow to set up Arduino IDE and upload your sketch:

  1. Install Arduino IDE by following the instructions here.
  2. Start Arduino IDE.
  3. Install the "esp32" boards platform by following the instructions here.
  4. Connect Arduino IDE to your Arduino Cloud account by following the instructions here
  5. You should now see the list of sketches from your Arduino Cloud account in the "SKETCHBOOK" panel of the IDE window. Click on the sketch you would like to upload to your board.
  6. Click the cloud with downward pointing arrow icon ("Pull Sketch") that appears to the right of the sketch name.
    A "Synchronizing sketchbook, pulling ..." process will start.
  7. Wait for the synchronization process to finish, as indicated by the appearance of a notification at the bottom right corner of the IDE window:

    Done pulling ...

  8. Double click on the sketch name in the "SKETCHBOOK" panel.
    The sketch will open in a new Arduino IDE window.
  9. Select the appropriate board from the IDE's Tools > Board > esp32 menu.
  10. Select the appropriate port from the IDE's Tools > Port menu.
  11. Select Sketch > Upload from the Arduino IDE menus.

The sketch should now upload successfully to the board.


Note that you can use Arduino IDE for development of Arduino Cloud Thing sketches. It is convenient to use the Arduino Cloud web interface for the initial setup of the Thing, but after that you can open the sketch in Arduino IDE for editing and uploading to your board. You will see newly created Thing sketches under the "Cloud Sketchbook" tab of the IDE's "SKETCHBOOK" panel after you click the "Sync" icon at the bottom right corner of the panel.


Please let me know if you have any questions or problems while following those instructions.

is this what i paid for, bs

I apologize for the inconvenience this bug has caused you.

I am having the same problem, is there a solution please?

Hi @tracker_2003.

I apologize for any inconvenience this bug has caused you.

I described the recommended workaround of using Arduino IDE in post #2 above. Please give that a try and let me know if you have any questions or problems.


If for some reason you can't or prefer not to use Arduino IDE, there is an alternative workaround of correcting the errors in the upload command and then running it from a command line terminal. I provided instructions for this workaround on Windows here:


:exclamation: Please note that this is an alternative to using Arduino IDE. If you use Arduino IDE, then there is no need for the workaround I describe at the link above.


If you are using another operating system and want to use this workaround, just let me know and I'll provide instructions tailored for your operating system. You can get a general idea of the nature of the workaround from looking at the Windows instructions at the link above.

Good news, everyone! The Arduino Cloud developers have fixed the bug. You should now be able to upload to use Arduino Cloud Editor to upload ESP32 boards without encountering that "No such file or directory" error message.

Please let us know if you still encounter any problems using Arduino Cloud.

I apologize for any inconvenience this bug has caused.

Regards, Per

I was having the same problem and error migrating from arduino IDE to the cloud. It works now. Thanks very much for the notification.

You are welcome. Thanks also to you for the update. I'm glad it is working for you now.

Regards, Per

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