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

NRFUTIL has issues unpacking a package.

I am trying to flash the firmware on a device with NRFUTIL. When I run NRFUTIL.exe on a my windows 10 machine I get the error

c:\Users\randy.cole\Documents>nrfutil.exe dfu serial -p COM3 -pkg Driver-V0.3.0.zip
Traceback (most recent call last):
  File "nordicsemi\__main__.py", line 1314, in <module>
  File "click\core.py", line 764, in __call__
  File "click\core.py", line 717, in main
  File "click\core.py", line 1137, in invoke
  File "click\core.py", line 1137, in invoke
  File "click\core.py", line 956, in invoke
  File "click\core.py", line 555, in invoke
  File "nordicsemi\__main__.py", line 1006, in serial
  File "nordicsemi\__main__.py", line 935, in do_serial
  File "nordicsemi\dfu\dfu.py", line 71, in __init__
  File "nordicsemi\dfu\package.py", line 641, in unpack_package
IOError: [Errno 2] No such file or directory: 'c:\\users\\randy~1.col\\appdata\\local\\temp\\nrf_dfu_mx45km\\unpacked_zip\\manifest.json'

This error occurs with both version 5.0.0 and 6.0.1. The 5.0.0 version I used is a standalone exe file that was in one of our git repositories. The 6.0.1 version in straight from using pip install nrfutil. However when either version is run on mac I do not have the error, and when on windows 7 with 5.0.0 there is no error. (We only have 1 windows 7 machine handy and it only had 5.0.0 at the time of testing)

If I watch the temp folder where it is searching for the unpacked zip and run the command I see a _MEIxxxxx folder get created and disappear quickly but that's it.

Parents
  • It seems the path is the problem, in specific the 'randy.cole is turned into 'randy~1.col'. Try to change the path from where you are running nrfutil.exe.

  • First thing I did was get the latest version executable from https://github.com/NordicSemiconductor/pc-nrfutil/releases. I got the same issue. So I took your advice. I moved the files all over the disk and nothing changed. I then changed the windows environment variable for TEMP and TMP to a location without any '.' and got this. I changed the temp location to C:\TEMP\

    C:\>nrfutil.exe -v -v -v -v dfu serial -p COM3 -pkg Driver-v0.3.0.zip
    2020-01-30 11:57:03,343 Using board at serial port: COM3
    Traceback (most recent call last):
      File "nordicsemi\__main__.py", line 1455, in <module>
      File "site-packages\click\core.py", line 764, in __call__
      File "site-packages\click\core.py", line 717, in main
      File "site-packages\click\core.py", line 1137, in invoke
      File "site-packages\click\core.py", line 1137, in invoke
      File "site-packages\click\core.py", line 956, in invoke
      File "site-packages\click\core.py", line 555, in invoke
      File "nordicsemi\__main__.py", line 1035, in serial
      File "nordicsemi\__main__.py", line 943, in do_serial
      File "nordicsemi\dfu\dfu.py", line 69, in __init__
      File "nordicsemi\dfu\package.py", line 649, in unpack_package
    FileNotFoundError: [Errno 2] No such file or directory: 'C:\\TEMP\\nrf_dfu_nu166aqg\\unpacked_zip\\manifest.json'

    It's the same error just at a different location. I tried running with an admin command prompt as well, just in case it didn't have permissions to write. 

Reply
  • First thing I did was get the latest version executable from https://github.com/NordicSemiconductor/pc-nrfutil/releases. I got the same issue. So I took your advice. I moved the files all over the disk and nothing changed. I then changed the windows environment variable for TEMP and TMP to a location without any '.' and got this. I changed the temp location to C:\TEMP\

    C:\>nrfutil.exe -v -v -v -v dfu serial -p COM3 -pkg Driver-v0.3.0.zip
    2020-01-30 11:57:03,343 Using board at serial port: COM3
    Traceback (most recent call last):
      File "nordicsemi\__main__.py", line 1455, in <module>
      File "site-packages\click\core.py", line 764, in __call__
      File "site-packages\click\core.py", line 717, in main
      File "site-packages\click\core.py", line 1137, in invoke
      File "site-packages\click\core.py", line 1137, in invoke
      File "site-packages\click\core.py", line 956, in invoke
      File "site-packages\click\core.py", line 555, in invoke
      File "nordicsemi\__main__.py", line 1035, in serial
      File "nordicsemi\__main__.py", line 943, in do_serial
      File "nordicsemi\dfu\dfu.py", line 69, in __init__
      File "nordicsemi\dfu\package.py", line 649, in unpack_package
    FileNotFoundError: [Errno 2] No such file or directory: 'C:\\TEMP\\nrf_dfu_nu166aqg\\unpacked_zip\\manifest.json'

    It's the same error just at a different location. I tried running with an admin command prompt as well, just in case it didn't have permissions to write. 

Children
No Data
Related