This is what I did at the beginning of the script
1 Like
I encounter a problem using google protobuf libraries
./create_ipfsnodeid_from_tmp_secret.dunikey.py
Traceback (most recent call last):
File "/home/pi/.zen/Astroport.ONE/tools/./create_ipfsnodeid_from_tmp_secret.dunikey.py", line 11, in <module>
import re, base58, base64, crypto_pb2
File "/home/pi/.zen/Astroport.ONE/tools/crypto_pb2.py", line 33, in <module>
_descriptor.EnumValueDescriptor(
File "/home/pi/.local/lib/python3.10/site-packages/google/protobuf/descriptor.py", line 755, in __new__
_message.Message._CheckCalledFromGeneratedFile()
TypeError: Descriptors cannot not be created directly.
If this call came from a _pb2.py file, your generated code is out of date and must be regenerated with protoc >= 3.19.0.
If you cannot immediately regenerate your protos, some other possible workarounds are:
1. Downgrade the protobuf package to 3.20.x or lower.
2. Set PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python (but this will use pure-Python parsing and will be much slower).
More information: https://developers.google.com/protocol-buffers/docs/news/2022-05-06#python-updates
May be you know how to stop using this libraries and create the IPFS Secret Key format another way?