Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

struct.error: unpack requires a buffer of 2 bytes #2

Open
justanothertryhard opened this issue Dec 14, 2019 · 0 comments
Open

struct.error: unpack requires a buffer of 2 bytes #2

justanothertryhard opened this issue Dec 14, 2019 · 0 comments

Comments

@justanothertryhard
Copy link

Attempting to use this script to convert Cowboy's Collection for Avaraline. I believe this is an easy fix, but I haven't done any scripting in about 10 years and I've never touched python.

$ python3.6 convert_levels.py cowboy.rsrc 

Traceback (most recent call last):
  File "convert_levels.py", line 155, in <module>
    resources = get_resources(args.file)
  File "convert_levels.py", line 42, in get_resources
    resources = reader.parse(data)
  File "/stuff/avara-level-converter-master/Converter/resource.py", line 29, in parse
    nameOffset = bytes_to_short(resmap[26:28])
  File "/stuff/avara-level-converter-master/Converter/helpers.py", line 9, in bytes_to_short
    return struct.unpack('>h', some_bytes)[0]
struct.error: unpack requires a buffer of 2 bytes

Cowboy's Collection: http://www.cytheraguides.com/archives/ambrosia_addons/avara/Levels/255_Cowboys%20Collection%201.2.sit.hqx

Unarchived, zipped (and renamed) Cowboy's Collection attached. cowboy.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant