3dstools icon indicating copy to clipboard operation
3dstools copied to clipboard

Many problems when using `msbt.py` with python3

Open v1993 opened this issue 5 years ago • 1 comments

Currently trying to get msbt.py to work. Problems so far:

  • Invalid header magic bytes: b'MsgStdBn' (expected MsgStdBn). Fixed by replacing MSBT_MAGIC = 'MsgStdBn' with MSBT_MAGIC = b'MsgStdBn'
  • Invalid file size reported: 1614020608 (OS reports 13408) Weird but doesn't seem fatal
Traceback (most recent call last):
  File "/home/v/Downloads/msbt.py", line 624, in <module>
    msbt.to_json(args.json)
  File "/home/v/Downloads/msbt.py", line 164, in to_json
    label_lists = self.sections['LBL1']['data']
KeyError: 'LBL1'

Stuck with this one right now. Changing 'LBL1' to b'LBL1' doesn't help.

v1993 avatar Apr 16 '20 10:04 v1993

I've managed to get further using python2, but still stuck with an error

Traceback (most recent call last):
  File "/home/v/Downloads/msbt.1.py", line 624, in <module>
    msbt.to_json(args.json)
  File "/home/v/Downloads/msbt.1.py", line 169, in to_json
    value = self.sections['TXT2']['data'][id_]
KeyError: 'TXT2'

v1993 avatar May 25 '20 18:05 v1993