AndroidDumps / dumpyara

Generate a dump from an archive or image(s)
144 stars 113 forks source link

"FIX" protobuf error #33

Closed poad42 closed 1 year ago

poad42 commented 2 years ago

Traceback (most recent call last): File "/home/adhitya/yaap/dump/Firmware_extractor/tools/extract_android_ota_payload/extract_android_ota_payload.py", line 13, in import update_metadata_pb2 File "/home/adhitya/yaap/dump/Firmware_extractor/tools/extract_android_ota_payload/update_metadata_pb2.py", line 34, in _descriptor.EnumValueDescriptor( File "/usr/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).

https://stackoverflow.com/questions/72441758/typeerror-descriptors-cannot-not-be-created-directly/72493690#72493690

https://github.com/protocolbuffers/protobuf/issues/10051

SebaUbuntu commented 1 year ago

No, this is the correct fix https://github.com/sebaubuntu-python/dumpyara/commit/c37990c5adde3373cfcba3d8703e2a8e9be9f868

poad42 commented 1 year ago

That's why I put it in quotes, to indicate it's not an actual fix since downgrading a package is not an ideal solution.

But if you have fixed the issue with that commit, great.

On Thu, Oct 20, 2022, 10:56 PM Sebastiano Barezzi @.***> wrote:

No, this is the correct fix @.*** https://github.com/sebaubuntu-python/dumpyara/commit/c37990c5adde3373cfcba3d8703e2a8e9be9f868

— Reply to this email directly, view it on GitHub https://github.com/AndroidDumps/dumpyara/pull/33#issuecomment-1286140191, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADMBC46P4ROC5TPHU4KBP4TWEGWYPANCNFSM55ZK33JQ . You are receiving this because you authored the thread.Message ID: @.***>