Avrdude: ser_open() error: The filename, directory name, or volume label syntax is incorrect

Hello,

I am using the Arduino IDE 2.2.1 and attempting to upload a sketch that I have previously uploaded and gotten to work, but I am getting this error:

avrdude: ser_open(): can't open device "\\.\COM7": The filename, directory name, or volume label syntax is incorrect.


Failed uploading: uploading error: exit status 1

This happened to me a couple days ago and I reinstalled Arduino IDE on my Windows machine, and it worked great again. Do you have any idea why I could be getting this error? Am I closing the program incorrectly or doing something else incorrectly?

Thank you very much for the help.

On IDE 2.x you MUST close Serial Monitor before uploading the new code to the board. If you forgot and it caused the error - restart the IDE, if it still fails - restart the computer.

Awesome, that worked. Thank you so much, I appreciate it!

1 Like

Please mark the topic as solved

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