Skip to content
This repository has been archived by the owner on Jan 17, 2023. It is now read-only.

nrfutil fails to run with python3 #350

Closed
Terstegge opened this issue Apr 9, 2021 · 2 comments
Closed

nrfutil fails to run with python3 #350

Terstegge opened this issue Apr 9, 2021 · 2 comments

Comments

@Terstegge
Copy link

I just tried to install nrfutil using
pip3 install nrfutil,
but after running the tools I get an error message:
Traceback (most recent call last):
File "/home/andreas/.local/bin/nrfutil", line 5, in
from nordicsemi.main import cli
File "/home/andreas/.local/lib/python3.8/site-packages/nordicsemi/main.py", line 49, in
from nordicsemi.dfu.bl_dfu_sett import BLDFUSettings
File "/home/andreas/.local/lib/python3.8/site-packages/nordicsemi/dfu/bl_dfu_sett.py", line 51, in
from nordicsemi.dfu.package import Package
File "/home/andreas/.local/lib/python3.8/site-packages/nordicsemi/dfu/package.py", line 53, in
from nordicsemi.dfu.init_packet_pb import InitPacketPB, DFUType, CommandTypes, ValidationTypes, SigningTypes, HashTypes
File "/home/andreas/.local/lib/python3.8/site-packages/nordicsemi/dfu/init_packet_pb.py", line 38, in
from . import dfu_cc_pb2 as pb
File "/home/andreas/.local/lib/python3.8/site-packages/nordicsemi/dfu/dfu_cc_pb2.py", line 18, in
DESCRIPTOR = _descriptor.FileDescriptor(
TypeError: init() got an unexpected keyword argument 'serialized_options'

Installation was successfull, though...

@mrquincle
Copy link

This is due to a too loose dependency setting on protobuf. Result of pipdeptree -p nrfutil (pipdeptree is a pip package):

nrfutil==6.1.0
  - click [required: Any, installed: 7.1.2]
  - crcmod [required: Any, installed: 1.7]
  - ecdsa [required: Any, installed: 0.17.0]
    - six [required: >=1.9.0, installed: 1.14.0]
  - intelhex [required: Any, installed: 2.3.0]
  - libusb1 [required: Any, installed: 1.9.2]
  - pc-ble-driver-py [required: >=0.14.2, installed: 0.15.0]
    - wrapt [required: Any, installed: 1.12.1]
  - piccata [required: Any, installed: 2.0.1]
  - protobuf [required: Any, installed: 3.6.1]
  - pyserial [required: Any, installed: 3.5]
  - pyspinel [required: >=1.0.0a3, installed: 1.0.3]
    - pyserial [required: Any, installed: 3.5]
  - pyyaml [required: Any, installed: 5.3.1]
  - tqdm [required: Any, installed: 4.61.0]

Protobuf here is 3.6.1 and works. You will see that if your protobuf is too old, you'll get this error.

@kenr
Copy link
Contributor

kenr commented Jan 17, 2023

Hi! We do not have capacity to maintain and release new versions of this utility.
We have made a new utility with the same name and feature set. It can be found here: https://www.nordicsemi.com/Products/Development-tools/nrf-util

@kenr kenr closed this as completed Jan 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants