panda-re / panda

Platform for Architecture-Neutral Dynamic Analysis
https://panda.re
Other
2.5k stars 479 forks source link

PyPANDA on python 3.10 #1143

Open AndrewFasano opened 2 years ago

AndrewFasano commented 2 years ago

After installing PyPanda 0.1.1.5 from PyPI, it raises an AttributeError when some key modules are imported:

Traceback (most recent call last):
  File "/home/runner/work/pypanda-plugins/pypanda-plugins/src/pandarepyplugins/IoctlFaker.py", line 5, in <module>
    from pandare import PyPlugin
  File "/opt/hostedtoolcache/Python/3.10.0/x64/lib/python3.10/site-packages/pandare/__init__.py", line 14, in <module>
    from .plog_reader import PLogReader
  File "/opt/hostedtoolcache/Python/3.10.0/x64/lib/python3.10/site-packages/pandare/plog_reader.py", line 8, in <module>
    import pandare.plog_pb2
  File "/opt/hostedtoolcache/Python/3.10.0/x64/lib/python3.10/site-packages/pandare/plog_pb2.py", line 8, in <module>
    from google.protobuf import reflection as _reflection
  File "/opt/hostedtoolcache/Python/3.10.0/x64/lib/python3.10/site-packages/google/protobuf/reflection.py", line 58, in <module>
    from google.protobuf.internal import python_message as message_impl
  File "/opt/hostedtoolcache/Python/3.10.0/x64/lib/python3.10/site-packages/google/protobuf/internal/python_message.py", line 62, in <module>
    from google.protobuf.internal import containers
  File "/opt/hostedtoolcache/Python/3.10.0/x64/lib/python3.10/site-packages/google/protobuf/internal/containers.py", line 182, in <module>
    MutableMapping = collections.MutableMapping
AttributeError: module 'collections' has no attribute 'MutableMapping'
lacraig2 commented 2 years ago

That looks like a protobuf/python 3.10 bug.

cctv130 commented 1 year ago

@AndrewFasano Undoubtedly, this is caused by the updated version, there are two answers, one is to choose not to update the project, the other is to continue to update to the new version, which means that the plug-in code also needs to be updated, and I see that the version dependence problem of this project is very serious.

AndrewFasano commented 1 year ago

Nope, the issue is related to the pypi package being really old. This is unrelated to panda plugins

cctv130 commented 1 year ago

Sorry, my English is not good, I mean pypanda needs to be update, did not say panda plug-in. translator always mistranslates my meaning

AndrewQuijano commented 3 months ago

@AndrewFasano I think we can close this issue. Currently, the LAVA container/MESS server are using Python 3.10 with current pandare (v1.8.39) package, and I am experiencing no issues. I didn't have issues for a while actually, but I don't know the version off the top of my head.

So it might be time to update the Panda container with Python 3.10

image