Loading error: Unable to construct the MPQArchive

24 views
Skip to first unread message

Yaser Norouzzadeh

unread,
Nov 11, 2015, 11:22:42 AM11/11/15
to sc2reader
Hi guys,

I'm new in sc2reader. I tried to load a replay, but I received the following error. Also, I tried different replay files.

Thank you in advance. 

code:

from sc2reader.factories import SC2Factory
path = 'D:/Code/Test/replays/GG623.rep'
sc2 = SC2Factory()
replay = sc2.load_replay(path)
print('done')

Error:

Traceback (most recent call last):
  File "C:\Program Files (x86)\JetBrains\PyCharm Community Edition 4.5.4\helpers\pydev\pydevd.py", line 2358, in <module>
    globals = debugger.run(setup['file'], None, None, is_module)
  File "C:\Program Files (x86)\JetBrains\PyCharm Community Edition 4.5.4\helpers\pydev\pydevd.py", line 1778, in run
    pydev_imports.execfile(file, globals, locals)  # execute the script
  File "C:\Program Files (x86)\JetBrains\PyCharm Community Edition 4.5.4\helpers\pydev\_pydev_imps\_pydev_execfile.py", line 18, in execfile
    exec(compile(contents+"\n", file, 'exec'), glob, loc) 
  File "D:/Code/Test/read.py", line 7, in <module>
    replay = sc2.load_replay(path)
  File "C:\Users\ynorouzz\AppData\Roaming\Python\Python34\site-packages\sc2reader\factories\sc2factory.py", line 85, in load_replay
    return self.load(Replay, source, options, **new_options)
  File "C:\Users\ynorouzz\AppData\Roaming\Python\Python34\site-packages\sc2reader\factories\sc2factory.py", line 137, in load
    return self._load(cls, resource, filename=filename, options=options)
  File "C:\Users\ynorouzz\AppData\Roaming\Python\Python34\site-packages\sc2reader\factories\sc2factory.py", line 146, in _load
    obj = cls(resource, filename=filename, factory=self, **options)
  File "C:\Users\ynorouzz\AppData\Roaming\Python\Python34\site-packages\sc2reader\resources.py", line 246, in __init__
    raise exceptions.MPQError("Unable to construct the MPQArchive", e)
sc2reader.exceptions.MPQError: ('Unable to construct the MPQArchive', ValueError('Invalid file header.',))

David Joerg

unread,
Nov 11, 2015, 12:13:39 PM11/11/15
to sc2reader
is it a valid replay file?  can you open it with starcraft2?

can you open it with s2protocol?  https://github.com/Blizzard/s2protocol


--
You received this message because you are subscribed to the Google Groups "sc2reader" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sc2reader+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Yaser Norouzzadeh

unread,
Nov 16, 2015, 8:29:33 AM11/16/15
to sc2reader
It should be a valid replays. There are some works on these dataset. But I could not open them in SC2, and I did not found a way how to use s2protocol module.

Yaser Norouzzadeh

unread,
Nov 17, 2015, 12:31:34 PM11/17/15
to sc2reader
I just realized that yhe mentioned dataset contains replays from SC I. Does sc2reader support it? If not, is there other Python module that could load this replays?

David Joerg

unread,
Nov 17, 2015, 1:26:24 PM11/17/15
to sc2reader
sc2reader only supports sc2.  not sure what sc1 parsers are out there if any.
Reply all
Reply to author
Forward
0 new messages