Mbed CLI cant compile

Hi, after sometime my Mbed CLI can’t compile anymore, I have deleted and re installed the program 4 times. Checked Python requirements etc.

Compile output:

Building project Teht1 (NUCLEO_F303RE, GCC_ARM)
Scan: Teht1
Macros: -DDEVICE_SPI=1 -DTARGET_STM32F303RE -D__MBED__=1 -DDEVICE_I2CSLAVE=1 -D__FPU_PRESENT=1 -DTARGET_NAME=NUCLEO_F303RE -DDEVICE_PORTINOUT=1 -DTARGET_RTOS_M4_M7 -DDEVICE_RTC=1 -DDEVICE_MPU=1 -DDEVICE_SERIAL_ASYNCH=1 -D__CMSIS_RTOS -DDEVICE_ANALOGOUT=1 -DTOOLCHAIN_GCC -DDEVICE_CRC=1 -DTARGET_CORTEX_M -DDEVICE_I2C_ASYNCH=1 -DTARGET_LIKE_CORTEX_M4 -DMBED_BUILD_TIMESTAMP=1600088368.59 -DTARGET_M4 -DDEVICE_PORTOUT=1 -DCOMPONENT_PSA_SRV_IMPL=1 -DTARGET_NUCLEO_F303RE -DDEVICE_SPI_ASYNCH=1 -DDEVICE_LPTICKER=1 -DDEVICE_PWMOUT=1 -DCOMPONENT_FLASHIAP=1 -DUSE_HAL_DRIVER -DTARGET_CORTEX -DDEVICE_I2C=1 -DTRANSACTION_QUEUE_SIZE_SPI=2 -DCOMPONENT_NSPE=1 -D__CORTEX_M4 -DDEVICE_STDIO_MESSAGES=1 -DTARGET_FF_MORPHO -DTARGET_FAMILY_STM32 -DTARGET_STM32F303xE -DTARGET_FF_ARDUINO -DDEVICE_PORTIN=1 -DTARGET_RELEASE -DTARGET_STM -DDEVICE_SERIAL_FC=1 -DCOMPONENT_PSA_SRV_EMUL=1 -DDEVICE_USTICKER=1 -DDEVICE_WATCHDOG=1 -DTARGET_LIKE_MBED -D__MBED_CMSIS_RTOS_CM -DDEVICE_SLEEP=1 -DTOOLCHAIN_GCC_ARM -DDEVICE_RESET_REASON=1 -DDEVICE_CAN=1 -DDEVICE_INTERRUPTIN=1 -DUSE_FULL_LL_DRIVER -DDEVICE_SPISLAVE=1 -DTARGET_STM32F3 -DDEVICE_ANALOGIN=1 -DDEVICE_SERIAL=1 -DDEVICE_FLASH=1 -DARM_MATH_CM4
Traceback (most recent call last):
  File "C:\Users\Teemu\Documents\AMK\Kevõt 2020\Differenentiaalilaskenta\Teht1\mbed-os\tools\make.py", line 78, in wrapped_build_project
    *args, **kwargs
  File "C:\Users\Teemu\Documents\AMK\Kevõt 2020\Differenentiaalilaskenta\Teht1\mbed-os\tools\build_api.py", line 595, in build_project
    objects = toolchain.compile_sources(resources, sorted(resources.get_file_paths(FileType.INC_DIR)))
  File "C:\Users\Teemu\Documents\AMK\Kevõt 2020\Differenentiaalilaskenta\Teht1\mbed-os\tools\toolchains\mbed_toolchain.py", line 413, in compile_sources
    return self._compile_sources(resources, inc_dirs=inc_dirs)
  File "C:\Users\Teemu\Documents\AMK\Kevõt 2020\Differenentiaalilaskenta\Teht1\mbed-os\tools\toolchains\mbed_toolchain.py", line 457, in _compile_sources
    self.inc_md5 = md5(' '.join(inc_paths).encode('utf-8')).hexdigest()
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe4 in position 14435: ordinal not in range(128)
[mbed] ERROR: "C:\Python27\python.exe" returned error.
       Code: 1
       Path: "C:\Users\Teemu\Documents\AMK\Kevõt 2020\Differenentiaalilaskenta\Teht1"
       Command: "C:\Python27\python.exe -u C:\Users\Teemu\Documents\AMK\Kevõt 2020\Differenentiaalilaskenta\Teht1\mbed-os\tools\make.py -t GCC_ARM -m NUCLEO_F303RE --source . --build .\BUILD\NUCLEO_F303RE\GCC_ARM -v"
       Tip: You could retry the last command with "-v" flag for verbose output
---

Hmm I have a feeling this might be caused by a non-ASCII character in a folder or file name in the code you’re building. If so, it’s definitely a bug.

Thanks for the reply! The problem was with the folder name and the program not recognising nordic special characters (Ä, Ö, Å). After changing folders it worked first try.

Hello
I am having similar issue but i have this Error again and again although i have uninstalled python 3.9 and have only python 2.7 running i hope you can help me i am frustrated .] ERROR: “c:\users\efrem\appdata\local\programs\python\python39\python.exe” returned error.
Code: 1