Upload Problem With a Cut-Short Error Message (Arduino UNO)

Hello, I haven't opened Arduino IDE in a couple of months and just today after installing the NewPing library I tried to upload a sketch just so I could see if my ultrasonic sensor was properly inputting and outputting data and found that my sketches (all of them, not just this specific one) are not compiling properly, giving me the following error:

exec: "C:\\Users\\Carmen 'Nat": file does not exist
Error compiling for board Arduino/Genuino Uno.

For some reason, the error message cuts short halfway through the name of my user folder, leaving out my last name, and then says "file does not exist". I'm guessing that it wants to point to a specific file, but for some reason it doesn't say anything past a certain point in the file path.

I'm running windows 10 64-bit, Arduino IDE 18.1, my programmer is set to "ArduinoISP", I checked if I set my Arduino Uno to the right port (COM 3) and the to right board setting (Arduino/Genuino Uno), and I've checked if the bootloader is working (it is). I however tried the loop-back test and when I sent data through the serial monitor nothing happened. Maybe it has something to do with that? I also tried uninstalling and reinstalling the NewPing Library, and updating my IDE to the latest version. I did not try to compile or upload prior to installing NewPing today, but in the past it has worked fine.

If it'll help, Here's the full message I got when I checked the verbose output setting (except with the full user folder name replaced with "[my name]" because I don't want to reveal it online):

C:\Program Files (x86)\Arduino\arduino-builder -dump-prefs -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware C:\Users\[my name]\AppData\Local\Arduino15\packages -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -tools C:\Users\[my name]\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\[my name]\Documents\Arduino\libraries -fqbn=arduino:avr:uno -ide-version=10801 -build-path C:\Users\CARMEN~1\AppData\Local\Temp\arduino_build_810872 -warnings=all -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avr-gcc.path=C:\Users\[my name]\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\4.9.2-atmel3.5.3-arduino2 -prefs=runtime.tools.arduinoOTA.path=C:\Users\[my name]\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.0.0 -prefs=runtime.tools.avrdude.path=C:\Users\[my name]\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino8 -verbose C:\Users\[my name]\Documents\Arduino\Low Budget Biodome\low_budget_biodome_behavior\low_budget_biodome_behavior.ino
C:\Program Files (x86)\Arduino\arduino-builder -compile -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware C:\Users\[my name]\AppData\Local\Arduino15\packages -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -tools C:\Users\[my name]\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\[my name]\Documents\Arduino\libraries -fqbn=arduino:avr:uno -ide-version=10801 -build-path C:\Users\CARMEN~1\AppData\Local\Temp\arduino_build_810872 -warnings=all -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avr-gcc.path=C:\Users\[my name]\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\4.9.2-atmel3.5.3-arduino2 -prefs=runtime.tools.arduinoOTA.path=C:\Users\[my name]\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.0.0 -prefs=runtime.tools.avrdude.path=C:\Users\[my name]\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino8 -verbose C:\Users\[my name]\Documents\Arduino\Low Budget Biodome\low_budget_biodome_behavior\low_budget_biodome_behavior.ino
Using board 'uno' from platform in folder: C:\Users\[my name]\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.17
Using core 'arduino' from platform in folder: C:\Users\[my name]\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.17
Detecting libraries used...
"C:\Users\[my name]\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\4.9.2-atmel3.5.3-arduino2/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics  -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10801 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR   "-IC:\Users\[my name]\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.17\cores\arduino" "-IC:\Users\[my name]\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.17\variants\standard" "C:\Users\CARMEN~1\AppData\Local\Temp\arduino_build_810872\sketch\low_budget_biodome_behavior.ino.cpp" -o "nul"
Generating function prototypes...
"C:\Users\[my name]\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\4.9.2-atmel3.5.3-arduino2/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics  -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10801 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR   "-IC:\Users\[my name]\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.17\cores\arduino" "-IC:\Users\[my name]\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.17\variants\standard" "C:\Users\CARMEN~1\AppData\Local\Temp\arduino_build_810872\sketch\low_budget_biodome_behavior.ino.cpp" -o "C:\Users\CARMEN~1\AppData\Local\Temp\arduino_build_810872\preproc\ctags_target_for_gcc_minus_e.cpp"
exec: "C:\\Users\\Carmen 'Nat": file does not exist
Error compiling for board Arduino/Genuino Uno.

I appreciate any help you can give me.

First off thank you for showing how a post should be..code tags lots of info..exceptional for a 1st time user.

I dont have my win 10 VM online right now but Win 7 should be good enough.

First off have you tried deleting the arduino15 folder and restarting ?
On Windows delete or rename both but you may have to turn on "hidden folders" to see it

C:\Users(username)\AppData\Roaming\Arduino15
C:\Users(username)\AppData\Local\Arduino15

Do a restart after that. and see if it helps. Those folders will be re-built BTW
If you have any special boards you may also have to reload them eg 101, MKR etc.

If that doesnt help there are more things to try but lets hope for the best as the other steps might take a while.

BTW new ping is not causing any issues here and I doubt they would keep it up as available if there was a serious flaw.

Also for a single run test only you could try turning off your antivirus / antimalware or other security in case that's an issue as there have been some recent reports in that aspect.

Hi, I tried doing what you said and I was able to find and delete the arduino15 folder in Local but not in Roaming (even after doing a search in the folder) and then restarted. Then I tried compiling again and the error message was different this time:

Arduino: 1.8.1 (Windows 10), Board: "Arduino/Genuino Uno"

avr-g++: error: [my name]\Documents\Arduino\libraries\NewPing": No such file or directory

avr-g++: error: C:\Users\Carmen 'Nat: No such file or directory

avr-g++: error: [my name]\Documents\Arduino\libraries\NewPing\NewPing.cpp": No such file or directory

avr-g++: warning: '-x c++' after last input file has no effect

avr-g++: fatal error: no input files

compilation terminated.

exit status 1
Error compiling for board Arduino/Genuino Uno.

It looks like the problem really is with NewPing. It says that there is no such file or directory but there is. I installed the library from here with the .zip file method, and it’s the most up-to-date version.

Here it is again with the verbositiy setting checked if you need it:

C:\Program Files (x86)\Arduino\arduino-builder -dump-prefs -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\[my name]\Documents\Arduino\libraries -fqbn=arduino:avr:uno -ide-version=10801 -build-path C:\Users\CARMEN~1\AppData\Local\Temp\arduino_build_631277 -warnings=none -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.arduinoOTA.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avr-gcc.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avrdude.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -verbose C:\Users\[my name]\Documents\Arduino\Low Budget Biodome\low_budget_biodome_behavior\low_budget_biodome_behavior.ino
C:\Program Files (x86)\Arduino\arduino-builder -compile -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\[my name]\Documents\Arduino\libraries -fqbn=arduino:avr:uno -ide-version=10801 -build-path C:\Users\CARMEN~1\AppData\Local\Temp\arduino_build_631277 -warnings=none -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.arduinoOTA.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avr-gcc.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avrdude.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -verbose C:\Users\[my name]\Documents\Arduino\Low Budget Biodome\low_budget_biodome_behavior\low_budget_biodome_behavior.ino
Using board 'uno' from platform in folder: C:\Program Files (x86)\Arduino\hardware\arduino\avr
Using core 'arduino' from platform in folder: C:\Program Files (x86)\Arduino\hardware\arduino\avr
Detecting libraries used...
"C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics  -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10801 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR   "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard" "C:\Users\CARMEN~1\AppData\Local\Temp\arduino_build_631277\sketch\low_budget_biodome_behavior.ino.cpp" -o "nul"
"C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics  -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10801 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR   "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard" "-IC:\Users\[my name]\Documents\Arduino\libraries\NewPing" "C:\Users\CARMEN~1\AppData\Local\Temp\arduino_build_631277\sketch\low_budget_biodome_behavior.ino.cpp" -o "nul"
"C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics  -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10801 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR   "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard" "-IC:\Users\[my name]\Documents\Arduino\libraries\NewPing" "C:\Users\[my name]\Documents\Arduino\libraries\NewPing\NewPing.cpp" -o "nul"
"C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics  -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10801 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR   "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\standard" "-IC:\Users\[my name]\Documents\Arduino\libraries\NewPing" "C:\Users\[my name]\Documents\Arduino\libraries\NewPing\NewPing.cpp" -o "C:\Users\CARMEN~1\AppData\Local\Temp\arduino_build_631277\preproc\ctags_target_for_gcc_minus_e.cpp"
avr-g++: error: [my name]\Documents\Arduino\libraries\NewPing": No such file or directory

avr-g++: error: C:\Users\Carmen 'Nat: No such file or directory

avr-g++: error: [my name]\Documents\Arduino\libraries\NewPing\NewPing.cpp": No such file or directory

avr-g++: warning: '-x c++' after last input file has no effect

avr-g++: fatal error: no input files

compilation terminated.

Using library NewPing in folder: C:\Users\[my name]\Documents\Arduino\libraries\NewPing (legacy)
exit status 1
Error compiling for board Arduino/Genuino Uno.

Thanks!

*edit: Oh yeah sorry I forgot to mention that since this restart I tried compiling while my antivirus was off like you suggested but the result was the same. I also tried compiling a sketch that doesn’t use NewPing and it works okay now, so the problem is with sketches that do use it.

mortebouse:
I was able to find and delete the arduino15 folder in Local but not in Roaming (even after doing a search in the folder)

That folder would only be there if you were using Arduino IDE 1.6.5 or older so that's no problem.

mortebouse:
avr-g++: error: C:\Users\Carmen 'Nat: No such file or directory

I know you don't want to post your user name but I suspect it's something about the name that's causing the issue because it looks like there is an apostrophe in it from the above error message but I'm not sure if there is more to the user name that's cut off. Could you post the user name with letters changed but all other symbols left as is (e.g. Joe 'Smitty' Smith).

Sure, it’s like [name] ‘[name]’ [name], like your example. The apostrophes are the only two symbols.

I think it's getting tripped up by the username

Elsewhere in the command, the username is shown as CARMEN~1 in the path (continuous path of upgrades from an ancient version of windows or something?), and I'll bet that's tripping something up.

I see, well if it really is the user folder that's mucking it up then I think I'll just try and do the project on my old laptop, where I've been able to use NewPing with no problem. Because after looking up some tutorials on how to change the user folder name, it doesn't look like there's any way to do it without running into the risk of messing up your computer and I really can't afford to lose the use of my new laptop right now.

Thank you all for your advice, though. You guys were really helpful.

There are a few ways to do it but safest is to add a new user with the actual name you and and permissions etc then just do a user settings transfer.

Double check that the new profiles does all you need then kill the old one.

As with anything like that its always best to do a backup up first.
But its generally quite painless and easy.