-
Notifications
You must be signed in to change notification settings - Fork 18
Open
Labels
Description
Hi,
i am trying to parse dmx files from CS2 that i get from Source2Viewer-CLI. I assume that is just currently not supported?
$ python dmx_test.py
Traceback (most recent call last):
File "D:\CSGO\ML\csgo\dmx_test.py", line 5, in <module>
print(Element.parse(f))
^^^^^^^^^^^^^^^^
File "C:\Users\Jan-Eric\AppData\Local\Programs\Python\Python311\Lib\site-packages\srctools\dmx.py", line 1321, in parse
result = cls.parse_bin(file, enc_vers, unicode)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Jan-Eric\AppData\Local\Programs\Python\Python311\Lib\site-packages\srctools\dmx.py", line 1367, in parse_bin
el_type = stringdb[ind]
~~~~~~~~^^^^^
from srctools.dmx import Element
from pathlib import Path
with Path('world_physics_hull.dmx').open('rb') as f:
print(Element.parse(f))