Closed
Description
Describe the problem
If the example for a library has .pde
file extension, Arduino IDE will silently fail to open it.
To reproduce
- Use Library Manager to install version "1.1" of the "TimerOne" library from Library Manager
- Select Examples > TimerOne > Interrupt
🐛 The example doesn't open. There is no communication of a problem.
Expected behavior
Arduino IDE opens all valid example sketches, regardless of whether they use a deprecated file extension.
Arduino IDE version
2.0.0-beta.11
Operating system
- macOS
- Windows
Operating system version
- Windows 10
- macOS (not stated)
Additional context
On the Arduino forum, user in0 has reproduced the error on Windows and provides additional info:
I can reproduce it. You can see the problem when run from the command line:
root ERROR Request cloneExample failed with error: ENOENT: no such file or directory, rename 'c:\Users\<user name>\AppData\Local\Temp\.arduinoIDE-unsaved2021827-16716-11heo0w.vdua\Interrupt\Interrupt.pde' -> 'c:\Users\<user name>\AppData\Local\Temp\.arduinoIDE-unsaved2021827-16716-11heo0w.vdua\Interrupt\Interrupt.ino'
It's trying to rename the sketch in the temporary folder rather than in its true path under the library installation.
I don't have this problem with a standalone sketch using the .pde file extension.
Additional Reports
- https://forum.arduino.cc/t/why-some-library-examples-do-not-load-in-arduino-ide-2-0/1104079/1
- https://forum.arduino.cc/t/exmaple-not-loading/1069511
- https://forum.arduino.cc/t/in-version-2-0-0-i-cant-open-accelstepper-examples/1041358
- https://forum.arduino.cc/t/newping-librarys-example-code-wont-open/1036177
- https://forum.arduino.cc/t/ds3231-of-example-frome-custom-libraries-is-not-open/934173
- https://forum.arduino.cc/t/ide-wont-load-sketches/1112447
Workaround
Rename the example sketch to use the .ino
file extension.
Issue checklist
- I searched for previous reports in the issue tracker
- I verified the problem still occurs when using the latest nightly build
- My report contains all necessary details