PlatformIO Community

'c:\users\xxxxx' is not recognized as an internal or external command, operable program or batch file

  • Core 5.2.1
  • Home 3.3.4

I have issues building Adafruit nRF52832 under arduino platform, i noticed is something doing with the user’s name “ricky gai” where the error is caused by python.exe as shown below:

c:\users\ricky gai.platformio\penv\scripts\python.exe “C:\Users\RICKY GAI.platformio\packages\tool-adafruit-nrfutil\” dfu genpkg --dev-type 0x0052 --sd-req 0x00B7 --application .pio\build\adafruit_feather_nrf52832\firmware.hex .pio\build\adafruit_feather_nrf52832\
MethodWrapper([“checkprogsize”], [".pio\build\adafruit_feather_nrf52832\firmware.elf"])
‘c:\users\ricky’ is not recognized as an internal or external command,
operable program or batch file.
*** [.pio\build\adafruit_feather_nrf52832\] Error 1
Advanced Memory Usage is available via “PlatformIO Home > Project Inspect”
RAM: [ ] 5.0% (used 3252 bytes from 65536 bytes)
Flash: [ ] 4.5% (used 23344 bytes from 524288 bytes)
.pio\build\adafruit_feather_nrf52832\firmware.elf :

section size addr

.text 22852 155648

.ARM.exidx 8 178500

.data 484 536884736

.bss 2768 536885220

.heap 46412 536887988

.ARM.attributes 50 0

.comment 126 0

.debug_frame 2372 0

Total 75072
========================================================== [FAILED] Took 8.74 seconds ==========================================================
The terminal process “C:\Users\RICKY GAI.platformio\penv\Scripts\platformio.exe ‘run’, ‘–verbose’, ‘–environment’, ‘adafruit_feather_nrf52832’” terminated with exit code: 1.

Please advise.

A PlatformIO builder script or sub-tool is not properly escaping the path – first c:\users\ricky gai.platformio\penv\scripts\python.exe should have been "c:\users\ricky gai.platformio\penv\scripts\python.exe". The problem lies in

  1. Open the file explorer and find the file C:\Users\<user>\.platformio\platforms\nordicnrf52\builder\
  2. Find the above referenced line 133 and replace "$PYTHONEXE" with '"$PYTHONEXE"'.
  3. Rebuild.
  4. Open an issue at to get this resolved on the developer side.
1 Like

Thank you so much for the hints, solved the issues :o) to update, the actual path of nRF52832’s is under:

C:\Users\RICKY GAI.platformio\platforms\nordicnrf52\builder\

Great, issue is open in

After I try to upload via JLink, it shown signing error:

"C:\Users\RICKY GAI\.platformio\penv\Scripts\python.exe" C:\Users\RICKY GAI\.platformio\packages\framework-arduinoadafruitnrf52\tools\pynrfbintool\ --signature .pio\build\adafruit_feather_nrf52832\firmware_signature.bin .pio\build\adafruit_feather_nrf52832\firmware.bin
C:\Users\RICKY GAI\.platformio\python3\python.exe: can't open file 'C:\Users\RICKY': [Errno 2] No such file or directory
*** [.pio\build\adafruit_feather_nrf52832\firmware_signature.bin] Error 2
====================================================== [FAILED] Took 4.28 seconds ======================================================
The terminal process "C:\Users\RICKY GAI\.platformio\penv\Scripts\platformio.exe 'run', '--verbose', '--environment', 'adafruit_feather_nrf52832'" terminated with exit code: 1.

Any idea ?

Well same issie again, missing escape. This time in the line

Try changing again "$PYTHONEXE" to '"$PYTHONEXE"' in line 152.

hi, I have tried the same method but still failed.

My bad, I was wrong. Not only do you have to do the above though, but additionally change


    '"%s"' % join(
        or "",

The indentation has to match exactly, so be careful.

1 Like

Thank you again maxgerhardt, now can compile and upload properly same sketch for both nRF52832 and nRF52840 after the red rectangle updated as shown on picture below.