Mahlet-Inc / Mahlet-Inc/hobbits

Relative imports for kaitai structs do not work

Open
#168 2 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

I'm trying to use relative imports with kaitai, which is a supported doc
however, I get file not found in the tmp directory when I try to do this
image

Here is the file I am trying to use:

meta:
  id: chat
  file-extension: worldchat
  endian: le
  imports:
  - ../header
seq:
  - id: packet_header
    type: header::data
  - id: chat_channel
    type: u1
    enum: chat_channel
  - id: unkonown2
    type: u2
  - id: message
    type: u4_wstr
enums:
  chat_channel:
    ....

This is the file structure:
image

Let me know if there's any other info that I can provide to help resolve this isse

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

No repository file or test is named in the report. Start by reproducing the relative ../header import from the provided YAML and inspect the Kaitai import handling around the temporary directory. Done means the header file resolves from the struct's location without a file-not-found error.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
reverse-engineering
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.