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

Error when opening a Gbx file #16

Open
cinephos opened this issue Mar 4, 2023 · 2 comments
Open

Error when opening a Gbx file #16

cinephos opened this issue Mar 4, 2023 · 2 comments

Comments

@cinephos
Copy link

cinephos commented Mar 4, 2023

I have managed (*) to correctly install pygbx on Ubuntu 22.04LTS and use libraries with spyder python. Dependency and dependency's dependencies were also installed (*) correctly.
(*) python-lzo by pip and its dependencies by apt

command g=Gbx('file.gbx') where file.gbx is a autosaved replay TM2020 file, produces this console output:

ERROR:root:unpack requires a buffer of 4 bytes
ERROR:root:unpack requires a buffer of 4 bytes
ERROR:root:unpack requires a buffer of 4 bytes
ERROR:root:unpack requires a buffer of 4 bytes
(above errors caused by line 105 in gbx.py)
ERROR:root:unpack requires a buffer of 4294967295 bytes
ERROR:root:Failed to parse map data: 'int' object has no attribute 'decode'
ERROR:root:unpack requires a buffer of 4 bytes
ERROR:root:unpack requires a buffer of 4 bytes
ERROR:root:unpack requires a buffer of 4 bytes
(above errors caused by line 136 in gbx.py)

However, continuing with commands:
replay = g.get_class_by_id(GbxType.REPLAY_RECORD)
print(replay.nickname)
then, the result is the expected one.

Any idea where these errors come from? How can I eliminate them?

@LinUwUxCat
Copy link

iirc this library only supports trackmania forever replays. TM2 replays sometimes work but i don't really expect TM2020 replays to work.

@cinephos
Copy link
Author

cinephos commented Mar 5, 2023

@LinUwUxCat I switched to the c# parser...

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

2 participants