tahu
tahu copied to clipboard
Python exception when running example.py
Why do I get the following error when running example.py
$ python3 example.py
Traceback (most recent call last):
File "/mnt/c/tmp/tahu/python/examples/example.py", line 19, in
- Downgrade the protobuf package to 3.20.x or lower.
- Set PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python (but this will use pure-Python parsing and will be much slower).
Chances are you are getting this because you are running a version of the protobuf package >3.20.x and the sparkplug_b_pb2.py file in this repo hasn't been regenerated with a compatible version of protoc. I regenerated the sparkplug_b_pb2.py file and the error went away for me.
I'm running protobuf version 4.21.9.
If you are using pip, you can check your version by running:
pip show protobuf