Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SnakeHook fails to import with Python 3.10+ #1334

Closed
AndrewFasano opened this issue Aug 24, 2023 · 0 comments · Fixed by #1335
Closed

SnakeHook fails to import with Python 3.10+ #1334

AndrewFasano opened this issue Aug 24, 2023 · 0 comments · Fixed by #1335

Comments

@AndrewFasano
Copy link
Member

I'm trying to run a simple pyplugin using snake_hook and a generic qcow:

$(python3 -m pandare.qcows mips) -panda snake_hook:files=test.py

I get the following error which I suspect is caused by my python version https://discuss.python.org/t/python3-11-importlib-no-longer-exposes-util/25641 - I'm on Python 3.10.12

PANDA[core]:os_familyno=2 bits=32 os_details=debian:3.2.0-4-4kc-malta
PANDA[snake_hook]:adding argument files=test.py.
PANDA[core]:initializing snake_hook
[snake_hook] Initialized
[PYPANDA] Panda args: [/home/andrew/git/panda/build/mips-softmmu/libpanda-mips.so -L /home/andrew/git/panda/build/pc-bios -m 128M -monitor unix:/tmp/pypanda_mpxuv94co,server,nowait]
Traceback (most recent call last):
  File "src/loader.rs", line 88, in <module>
  File "/home/andrew/git/panda/panda/python/core/pandare/pypluginmanager.py", line 234, in load_all
    spec = importlib.util.spec_from_file_location("plugin_file", plugin_file)
AttributeError: module 'importlib' has no attribute 'util'
thread '<unnamed>' panicked at 'python!{...} failed to execute', /home/andrew/.cargo/registry/src/index.crates.io-6f17d22bba15001f/inline-python-0.7.0/src/context.rs:203:17
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
fatal runtime error: failed to initiate panic, error 5
Aborted (core dumped)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant