Mahlet-Inc / Mahlet-Inc/hobbits

analyzing Kaitai Structs fails on missing 'pkg_ressources' python module

Open
#156 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
751
Forks
49
PR merge metrics
No merged PRs in 30d

Description

If your system python is not 3.9 you're pretty screwed on analizing Kaitai Structs:

```Analyzer Plugin Error: Plugin 'Kaitai Struct' reported an error with its processing: Failure Running parser in Python:
Python stderr:
Traceback (most recent call last):
File "/tmp/HobbitsPythonrBHuvX/thescript.py", line 162, in parse_data
struct_module = importlib.__import__(package_name, fromlist=[class_name])
File "", line 1109, in __import__
File "", line 1030, in _gcd_import
File "", line 1007, in _find_and_load
File "", line 986, in _find_and_load_unlocked
File "", line 680, in _load_unlocked
File "", line 850, in exec_module
File "", line 228, in _call_with_frames_removed
File "/tmp/hobbits-GGgAzl/png.py", line 3, in
from pkg_resources import parse_version
ModuleNotFoundError: No module named 'pkg_resources'
```

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing Kaitai Struct analysis with a system Python version other than 3.9 and inspect the reported import failure for pkg_resources. Trace how the analyzer invokes the generated parser; done means the analysis completes without ModuleNotFoundError.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
reverse-engineering, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.