This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

nrfutil UnicodeDecodeError

HI

    when I use nrfutil.exe to generate .zip file on win10 64bit, I got the UnicodeDecodeError. 

    And :

         Python version 2.7.9 (default, Dec 10 2014, 12:28:03) [MSC v.1500 64 bit (AMD64)] on win32

        nrfutil version 3.3.2.

        SDK 15.3.0

         the example is "\examples\dfu\secure_bootloader\pca10056_uart"

         I use the command is "nrfutil pkg generate --hw-version 52 --application-version 1 --application nrf52840_xxaa.hex --sd-req 0xae --key-file private.key app_dfu_package.zip"

        but I got the UnicodeDecodeError,the error message is :

        

C:\packet>nrfutil pkg generate --hw-version 52 --application-version 1 --application nrf52840_xxaa.hex --sd-req 0xae --key-file private.key app_dfu_package.zip
Traceback (most recent call last):
File "nordicsemi\__main__.py", line 871, in <module>
File "site-packages\click\core.py", line 722, in __call__
File "site-packages\click\core.py", line 697, in main
File "site-packages\click\core.py", line 1066, in invoke
File "site-packages\click\core.py", line 1066, in invoke
File "site-packages\click\core.py", line 895, in invoke
File "site-packages\click\core.py", line 535, in invoke
File "nordicsemi\__main__.py", line 580, in generate
File "nordicsemi\dfu\package.py", line 339, in generate_package
File "nordicsemi\dfu\package.py", line 486, in normalize_firmware_to_bin
File "ntpath.py", line 85, in join
UnicodeDecodeError: 'ascii' codec can't decode byte 0xcd in position 7: ordinal not in range(128)
Failed to execute script __main__

C:\packet>

The "packet" folder only two files : nrf52840_xxaa.hex and private.key

I refer to the Nordic blog :https://devzone.nordicsemi.com/nordic/nordic-blog/b/blog/posts/getting-started-with-nordics-secure-dfu-bootloader.

How should I solve this problem?

Related