Skip to content

cannot import name 'decode_modified_utf8' from partially initialized module 'mutf8' (most likely due to a circular import) #14

@eatingallday

Description

@eatingallday

when I execute the code:

python3 droidstatx.py --apk ./benchmark-apks/MSTG-Android-Java.apk

it turns out:
Traceback (most recent call last):
File "droidstatx.py", line 5, in
from App import App
File "/app/App.py", line 2, in
from androguard.misc import AnalyzeAPK
ModuleNotFoundError: No module named 'androguard'

so I try

export $PYTHONPATH = /path/to/androguard

to fix this problem, and another circular import error happens:
File "/home/layang/tools/droidstatx-master/androguard/androguard/core/bytecode.py", line 8, in
from androguard.core.dex.dex_types import Kind, Operand
File "/home/layang/tools/droidstatx-master/androguard/androguard/core/dex/init.py", line 21, in
from androguard.core import mutf8
File "/home/layang/tools/droidstatx-master/androguard/androguard/core/mutf8/init.py", line 7, in
from mutf8 import decode_modified_utf8, encode_modified_utf8
File "/home/layang/tools/droidstatx-master/androguard/androguard/core/mutf8/init.py", line 7, in
from mutf8 import decode_modified_utf8, encode_modified_utf8
ImportError: cannot import name 'decode_modified_utf8' from partially initialized module 'mutf8' (most likely due to a circular import) (/home/layang/tools/droidstatx-master/androguard/androguard/core/mutf8/init.py)

why is this happens and how to fix this error

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions