Skip to content

struct.error: unpack requires a buffer of 3714449519 bytes #92

@sebastientromp

Description

@sebastientromp

When running unityextract with ./bin/unityextract --audio -o out/audio2 /d/Games/Hearthstone/Data/Win/*.unity3d, I have the following stack trace:

Traceback (most recent call last):
  File "./bin/unityextract", line 159, in <module>
    main()
  File "./bin/unityextract", line 155, in main
    exit(app.run())
  File "./bin/unityextract", line 57, in run
    self.handle_asset(asset)
  File "./bin/unityextract", line 83, in handle_asset
    if obj.type not in self.handle_formats:
  File "C:\Users\Daedin\AppData\Local\Programs\Python\Python36\lib\site-packages\unitypack-0.9.0-py3.6.egg\unitypack\object.py", line 30, in type
    script = self.read()["m_Script"]
  File "C:\Users\Daedin\AppData\Local\Programs\Python\Python36\lib\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 "C:\Users\Daedin\AppData\Local\Programs\Python\Python36\lib\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 "C:\Users\Daedin\AppData\Local\Programs\Python\Python36\lib\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 "C:\Users\Daedin\AppData\Local\Programs\Python\Python36\lib\site-packages\unitypack-0.9.0-py3.6.egg\unitypack\object.py", line 118, in read_value
    result = buf.read_string(size)
  File "C:\Users\Daedin\AppData\Local\Programs\Python\Python36\lib\site-packages\unitypack-0.9.0-py3.6.egg\unitypack\utils.py", line 70, in read_string
    ret = struct.unpack(self.endian + "%is" % (size), self.read(size))[0]
struct.error: unpack requires a buffer of 3714449519 bytes

This looked similar to #23, and I tried to re-clone unitypack and reinstall from scratch, but the issue still persists.

Do you have any idea how to fix this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions