Skip to content

[ManiaPlanet4] Replay Issue #3

@w1lla

Description

@w1lla

Some issue with reading ManiaPlanet 4 Replays, Its in the gbx.py as it has no full support for all .Gbx Files it seems?

Processing:     Old fashioned tech - 026_da¢SP´Niwes(00'22''05).Replay.Gbx
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
ERROR:root:Failed to read string: 'utf-8' codec can't decode byte 0x90 in position 1: invalid start byte
ERROR:root:unpack requires a buffer of 16777216 bytes
multiprocessing.pool.RemoteTraceback:
"""
Traceback (most recent call last):
  File "c:\users\w1lla\appdata\local\programs\python\python38\lib\multiprocessing\pool.py", line 125, in worker
    result = (True, func(*args, **kwds))
  File "c:\users\w1lla\appdata\local\programs\python\python38\lib\multiprocessing\pool.py", line 51, in starmapstar
    return list(itertools.starmap(args[0], args[1]))
  File "C:\tmn\pyplanet\tmtrackNN\preprocessing.py", line 99, in process_fname
    replay_file = Gbx(fname)
  File "C:\tmn\pyplanet\tmtrackNN\tmnnenv\lib\site-packages\pygbx\gbx.py", line 136, in __init__
    self._read_node(self.class_id, -1, bp)
  File "C:\tmn\pyplanet\tmtrackNN\tmnnenv\lib\site-packages\pygbx\gbx.py", line 590, in _read_node
    game_class.track = Gbx(data)
  File "C:\tmn\pyplanet\tmtrackNN\tmnnenv\lib\site-packages\pygbx\gbx.py", line 136, in __init__
    self._read_node(self.class_id, -1, bp)
  File "C:\tmn\pyplanet\tmtrackNN\tmnnenv\lib\site-packages\pygbx\gbx.py", line 431, in _read_node
    block.name = bp.read_string_lookback()
  File "C:\tmn\pyplanet\tmtrackNN\tmnnenv\lib\site-packages\pygbx\bytereader.py", line 212, in read_string_lookback
    s = self.read_string()
  File "C:\tmn\pyplanet\tmtrackNN\tmnnenv\lib\site-packages\pygbx\bytereader.py", line 167, in read_string
    return self.read(strlen, str(strlen) + 's').decode('utf-8')
AttributeError: 'int' object has no attribute 'decode'
"""

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "preprocessing.py", line 143, in <module>
    entries = p.starmap(process_fname, it)
  File "c:\users\w1lla\appdata\local\programs\python\python38\lib\multiprocessing\pool.py", line 372, in starmap
    return self._map_async(func, iterable, starmapstar, chunksize).get()
  File "c:\users\w1lla\appdata\local\programs\python\python38\lib\multiprocessing\pool.py", line 768, in get
    raise self._value
AttributeError: 'int' object has no attribute 'decode'
```

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions