happyleavesaoc / aoc-mgz

Age of Empires II recorded game parsing and summarization in Python 3.
MIT License
197 stars 42 forks source link

Can't get examples to run #5

Closed mboop127 closed 4 years ago

mboop127 commented 5 years ago

Hello,

I am trying to use this just to extract score, but I can't run the examples without erroring out. Below is an example of the issues I get when I run the parser. I have also tried to chase the issue down the chain, but even init is failing. I am not very experienced so I could have installed struct wrong or something, but these pointers don't seem to indicate that.

Traceback (most recent call last): File "C:\Users\Matthew\Desktop\aoc-mgz-master\parse.py", line 2, in from mgz import header, body File "C:\Users\Matthew\Desktop\aoc-mgz-master\mgz__init__.py", line 9, in from mgz.header.map_info import map_info File "C:\Users\Matthew\Desktop\aoc-mgz-master\mgz\header\map_info.py", line 17, in "elevation"/Byte File "C:\Users\Matthew\Desktop\aoc-mgz-master\construct\core.py", line 1963, in init self.subcons = mergefields(*subcons) File "C:\Users\Matthew\Desktop\aoc-mgz-master\construct\core.py", line 197, in mergefields result.extend(select(sc)) File "C:\Users\Matthew\Desktop\aoc-mgz-master\construct\core.py", line 189, in select return select(sc.subcon) File "C:\Users\Matthew\Desktop\aoc-mgz-master\construct\core.py", line 189, in select return select(sc.subcon) File "C:\Users\Matthew\Desktop\aoc-mgz-master\construct\core.py", line 192, in select raise ConstructError("Embedding only works with: Struct Sequence FocusedSeq Union LazyStruct") construct.core.ConstructError: Embedding only works with: Struct Sequence FocusedSeq Union LazyStruct

happyleavesaoc commented 5 years ago

Which version do you have installed?

Try pip install -U construct==2.8.16 and then retry.

mboop127 commented 5 years ago

I got construct to install properly but I still can't extract any info. I am fairly certain that this is not a problem with your code, I just had no other way of contacting you for guidance. If you are willing to help me out, please email me at m.boop127@gmail.com -- thanks!