Issue with west ncs-provision upload during DFU provisioning on nRF54L15DK

I'm following the Lesson 9, Exercise 2: DFU over USB - Adding External Flash from the Nordic Academy: Tutorial Link

SoC: nrf54l15

SDK version: 3.0.2

Toolchain version: 3.0.2

Problem:

I am able to follow the tutorial properly up untill the KMU provisioning step. 

But for the provisioniing command:

west ncs-provision upload -s nrf54l15 -k private_key.pem

I am getting: 

nrfutil device x-provision-keys --key-file C:\Users\Admin\AppData\Local\Temp\nrfutil_jf766dmw\keyfile.json --traits jlink
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "C:\Users\Admin\AppData\Local\Programs\Python\Python312\Scripts\nrfutil.exe\__main__.py", line 4, in <module>
  File "C:\Users\Admin\AppData\Local\Programs\Python\Python312\Lib\site-packages\nordicsemi\__main__.py", line 53, in <module>
    from nordicsemi.dfu.dfu_transport_serial import DfuTransportSerial
  File "C:\Users\Admin\AppData\Local\Programs\Python\Python312\Lib\site-packages\nordicsemi\dfu\dfu_transport_serial.py", line 52, in <module>
    from nordicsemi.lister.device_lister import DeviceLister
  File "C:\Users\Admin\AppData\Local\Programs\Python\Python312\Lib\site-packages\nordicsemi\lister\device_lister.py", line 39, in <module>
    from nordicsemi.lister.windows.lister_win32 import Win32Lister
  File "C:\Users\Admin\AppData\Local\Programs\Python\Python312\Lib\site-packages\nordicsemi\lister\windows\lister_win32.py", line 43, in <module>
    from constants import DIGCF_PRESENT, DEVPKEY, DIGCF_DEVICEINTERFACE
ModuleNotFoundError: No module named 'constants'

Uploading failed!

What I’ve Tried:

  • I downgraded protobuf to 3.20.x as previously suggested in other threads.

  • Verified that nrfutil and west are both from the NCS v3.x toolchain.

  • Verified my key file is valid and present.

  • I'm running this on Python 3.12

Parents
  • Hi, you can use nRF Connect for VS Code and choose the "nRF Connect" profile


    or you can run "nrfutil sdk-manager toolchain launch --ncs-version v3.1.0 --terminal" (or whatever ncs version that you are using if it's newer than 3.0)

    The error that you are seeing is most likely because the environment is not properly set up for west

    Run these is you still run into errors for me to see what's wrong.

    where west
    west --version

Reply
  • Hi, you can use nRF Connect for VS Code and choose the "nRF Connect" profile


    or you can run "nrfutil sdk-manager toolchain launch --ncs-version v3.1.0 --terminal" (or whatever ncs version that you are using if it's newer than 3.0)

    The error that you are seeing is most likely because the environment is not properly set up for west

    Run these is you still run into errors for me to see what's wrong.

    where west
    west --version

Children
No Data
Related