Closed mickael9 closed 1 year ago
Also happens in Linux 64bits (Ubuntu 22.10). PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python is simple workaround but upgrading to protobuf 4 would be nice.
We do not have capacity to maintain and release new versions of this utility. A new utility with the same name will cover this feature. It can be found here: https://www.nordicsemi.com/Products/Development-tools/nrf-util
I was trying to generate a DFU package with just the softdevice, like this:
And getting the following error:
It seems that the protobuf-generated
InitCommand()
class will interpret 0xFFFFFFFF as -1, as can be demonstrated with the following code:Only 32-bit Python on Windows seems to be affected (tested with Python 3.7 & 3.10 Win32, don't know if it happens on Linux 32) The bug was introduced in protobuf 3.19 (downgrading using
pip install protobuf<3.19
fixes the issue)I suppose this could be fixed by either modifying the
_validate
logic or specifyingprotobuf<3.19
in requirements. Alternatively, upgrading to protobuf 4 seems to resolve the issue (butdfu_cc_pb2.py
needs to be regenerated)