HearthSim / UnityPack

Python deserialization library for Unity3D Asset format

Home Page:https://hearthsim.info/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unpacking error some assets files

hwiorn opened this issue · comments

These assets file does not unpack by UnityPack(python-unitypack 0.9.0). Could you check these assets?

sharedassets0.zip

sharedassets2.zip

$ unityextract --all --as-asset sharedassets0.assets
Traceback (most recent call last):
  File "/Users/gglee/anaconda3/bin/unityextract", line 4, in <module>
    __import__('pkg_resources').run_script('unitypack==0.9.0', 'unityextract')
  File "/Users/gglee/anaconda3/lib/python3.6/site-packages/pkg_resources/__init__.py", line 666, in run_script
    self.require(requires)[0].run_script(script_name, ns)
  File "/Users/gglee/anaconda3/lib/python3.6/site-packages/pkg_resources/__init__.py", line 1453, in run_script
    exec(code, namespace, namespace)
  File "/Users/gglee/anaconda3/lib/python3.6/site-packages/unitypack-0.9.0-py3.6.egg/EGG-INFO/scripts/unityextract", line 159, in <module>
    main()
  File "/Users/gglee/anaconda3/lib/python3.6/site-packages/unitypack-0.9.0-py3.6.egg/EGG-INFO/scripts/unityextract", line 155, in main
    exit(app.run())
  File "/Users/gglee/anaconda3/lib/python3.6/site-packages/unitypack-0.9.0-py3.6.egg/EGG-INFO/scripts/unityextract", line 50, in run
    self.handle_asset(asset)
  File "/Users/gglee/anaconda3/lib/python3.6/site-packages/unitypack-0.9.0-py3.6.egg/EGG-INFO/scripts/unityextract", line 92, in handle_asset
    d = obj.read()
  File "/Users/gglee/anaconda3/lib/python3.6/site-packages/unitypack-0.9.0-py3.6.egg/unitypack/object.py", line 84, in read
    return self.read_value(self.type_tree, BinaryReader(BytesIO(object_buf)))
  File "/Users/gglee/anaconda3/lib/python3.6/site-packages/unitypack-0.9.0-py3.6.egg/unitypack/object.py", line 149, in read_value
    result[child.name] = self.read_value(child, buf)
  File "/Users/gglee/anaconda3/lib/python3.6/site-packages/unitypack-0.9.0-py3.6.egg/unitypack/object.py", line 149, in read_value
    result[child.name] = self.read_value(child, buf)
  File "/Users/gglee/anaconda3/lib/python3.6/site-packages/unitypack-0.9.0-py3.6.egg/unitypack/object.py", line 107, in read_value
    result = buf.read_uint()
  File "/Users/gglee/anaconda3/lib/python3.6/site-packages/unitypack-0.9.0-py3.6.egg/unitypack/utils.py", line 105, in read_uint
    return struct.unpack(self.endian + "I", self.read(4))[0]
struct.error: unpack requires a buffer of 4 bytes