makerdiary / nrf52840-mdk-usb-dongle

An open-source, small and low-cost USB Dongle that supports Bluetooth 5.4, Bluetooth mesh, Thread, Zigbee, 802.15.4, ANT and 2.4 GHz proprietary protocols
https://wiki.makerdiary.com/nrf52840-mdk-usb-dongle/
Apache License 2.0
300 stars 79 forks source link

AttributeError: 'dict' object has no attribute 'iteritems' #56

Open myrdrks opened 3 years ago

myrdrks commented 3 years ago

Hey there.

When I try (python3.9): pi@raspberrypi:~/openthread/output/nrf52840/bin $ nrfutil pkg generate --hw-version 52 --sd-req 0x00 --application-version 1 --application ot-rcp.hex app.zip

I get: AttributeError: 'dict' object has no attribute 'iteritems'

When I then try to fix "/home/pi/.local/lib/python3.9/site-packages/nordicsemi/dfu/package.py:403": -iteritems() +items() I get a lot more errors.

Please send help!

whjochim commented 3 years ago

I just had the same Issue, it was solved for me by downgrading to Python 3.8 in an virtual environment. nrfutil doesn't seem to support Python 3.9 currently. Hope it helps

phoebebright commented 1 year ago

Am running python 3.9 and had same issue. Followed these steps and started working (not sure why!)::

 sudo apt-get -y install libusb-1.0-0-dev sed
 pip3 install click crcmod ecdsa intelhex libusb1 piccata protobuf pyserial pyyaml tqdm pc_ble_driver_py
 pip3 install -U --no-dependencies nrfutil
bjh45964 commented 4 months ago

Am running python 3.9 and had same issue. Followed these steps and started working (not sure why!)::

 sudo apt-get -y install libusb-1.0-0-dev sed
 pip3 install click crcmod ecdsa intelhex libusb1 piccata protobuf pyserial pyyaml tqdm pc_ble_driver_py
 pip3 install -U --no-dependencies nrfutil

This worked for me, fixed broken install of nrfutil (Was following https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.9.2-dev1/matter/openthread_rcp_nrf_dongle.html), working on Raspbian 11.1, nrfutil-6.1.7, Python 3.9.2, pip 20.3.4