-
Notifications
You must be signed in to change notification settings - Fork 135
Closed
Milestone

Description
Trying to get https://github.com/Blizzard/heroprotocol running via Blizzard/heroprotocol#59
It includes a new version of mpyp (the library to read MPQ files), but it bails on No module named '_bz2'
Which is used in mpyq import bz2
I see in SciPy also bz2
is imported, any issues with that?
This is my code
package heroes
import org.graalvm.polyglot._
object Main extends App {
val context = Context.newBuilder().allowIO(true).build
val v = context.getPolyglotBindings()
val _ = context.eval("python",
"""
|from heroprotocol import protocol29406
|from heroprotocol.mpyq import mpyq
|
|archive = mpyq.MPQArchive('/path/to/replay')
|contents = archive.header['user_data_header']['content']
|header = protocol.decode_replay_header(contents)
|
|# The header's baseBuild determines which protocol to use
|baseBuild = header['m_version']['m_baseBuild']
|try:
| protocol = __import__('protocol%s' % (baseBuild,))
|except:
| print >> sys.stderr, 'Unsupported base build: %d' % baseBuild
| sys.exit(1)
|
|""".stripMargin)
}
Can put up a repo if you want?