Comments (6)
Ok, now you are seeing expected behavior. 4 and 5 (relying on "fast mode") aren't compatible with the latest version of DE, yet. You'll want to use the "full mode"/Summary
to parse the latest recs.
from aoc-mgz.
Are you using the latest version of mgz
? You'll need to git clone
the repository to get it.
from aoc-mgz.
I updated construct
from 2.8.16 to 2.10.68 and now import mgz
causes an error, so I cannot check the version. I got it via pip
though, not on github. I'll try with github.
ImportError: cannot import name 'Embedded' from 'construct' (C:\WPy64-3870\python-3.8.7.amd64\lib\site-packages\construct\__init__.py)
Edit: it was mgz-1.7.3
that I got via pip. I am installing 1.7.4 right now.
from aoc-mgz.
I reverted the construct upgrade.
With a manual install of mgz-1.7.4
I have the three first examples that work. Examples 4 and 5 yield a different error now.
Traceback (most recent call last):
File "C:\WPy64-3870\python-3.8.7.amd64\lib\site-packages\mgz-1.7.4-py3.8.egg\mgz\fast\header.py", line 463, in parse
players, mod = parse_players(header, num_players, version)
File "C:\WPy64-3870\python-3.8.7.amd64\lib\site-packages\mgz-1.7.4-py3.8.egg\mgz\fast\header.py", line 430, in parse_players
players = [parse_player(header, number, num_players) for number in range(num_players)]
File "C:\WPy64-3870\python-3.8.7.amd64\lib\site-packages\mgz-1.7.4-py3.8.egg\mgz\fast\header.py", line 430, in <listcomp>
players = [parse_player(header, number, num_players) for number in range(num_players)]
File "C:\WPy64-3870\python-3.8.7.amd64\lib\site-packages\mgz-1.7.4-py3.8.egg\mgz\fast\header.py", line 116, in parse_player
name, resources = unpack(f'<{name_length - 1}s2xIx', header)
File "C:\WPy64-3870\python-3.8.7.amd64\lib\site-packages\mgz-1.7.4-py3.8.egg\mgz\fast\header.py", line 33, in unpack
output = struct.unpack(fmt, data.read(struct.calcsize(fmt)))
struct.error: bad char in struct format
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "REDACTED/PATH/TO/MY/PROGRAM", line 49, in <module>
match = parse_match(data)
File "C:\WPy64-3870\python-3.8.7.amd64\lib\site-packages\mgz-1.7.4-py3.8.egg\mgz\model\__init__.py", line 93, in parse_match
data = parse(handle)
File "C:\WPy64-3870\python-3.8.7.amd64\lib\site-packages\mgz-1.7.4-py3.8.egg\mgz\fast\header.py", line 467, in parse
raise RuntimeError("could not parse")
RuntimeError: could not parse
Traceback (most recent call last):
File "C:\WPy64-3870\python-3.8.7.amd64\lib\site-packages\mgz-1.7.4-py3.8.egg\mgz\fast\header.py", line 463, in parse
players, mod = parse_players(header, num_players, version)
File "C:\WPy64-3870\python-3.8.7.amd64\lib\site-packages\mgz-1.7.4-py3.8.egg\mgz\fast\header.py", line 430, in parse_players
players = [parse_player(header, number, num_players) for number in range(num_players)]
File "C:\WPy64-3870\python-3.8.7.amd64\lib\site-packages\mgz-1.7.4-py3.8.egg\mgz\fast\header.py", line 430, in <listcomp>
players = [parse_player(header, number, num_players) for number in range(num_players)]
File "C:\WPy64-3870\python-3.8.7.amd64\lib\site-packages\mgz-1.7.4-py3.8.egg\mgz\fast\header.py", line 116, in parse_player
name, resources = unpack(f'<{name_length - 1}s2xIx', header)
File "C:\WPy64-3870\python-3.8.7.amd64\lib\site-packages\mgz-1.7.4-py3.8.egg\mgz\fast\header.py", line 33, in unpack
output = struct.unpack(fmt, data.read(struct.calcsize(fmt)))
struct.error: bad char in struct format
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "REDACTED/PATH/TO/MY/PROGRAM", line 56, in <module>
match = parse_match(data)
File "C:\WPy64-3870\python-3.8.7.amd64\lib\site-packages\mgz-1.7.4-py3.8.egg\mgz\model\__init__.py", line 93, in parse_match
data = parse(handle)
File "C:\WPy64-3870\python-3.8.7.amd64\lib\site-packages\mgz-1.7.4-py3.8.egg\mgz\fast\header.py", line 467, in parse
raise RuntimeError("could not parse")
RuntimeError: could not parse
from aoc-mgz.
All the dependencies were installed properly apparently.
from aoc-mgz.
Ok, thank you so much for your fast reply!
from aoc-mgz.
Related Issues (20)
- Error: unpack requires a buffer of 8 bytes HOT 5
- construct.core.MappingError - Same error consistently HOT 2
- crash since v101.101.61591.0 - construct.core.MappingError: no decoding mapping for 8 HOT 2
- construct.core.MappingError: no decoding mapping for 8 HOT 1
- Parsing incorrect bytes when using summary snippet in README file HOT 4
- Unable to use JSON parser HOT 6
- collections.Hashable -> collections.abc.Hashable HOT 1
- RuntimeError: bad object parse HOT 11
- How to merge two games that share a common point? HOT 1
- Issue using parse_match() function in python 3.10 HOT 5
- how do you generate minimaps? HOT 2
- What is playback? HOT 2
- struct.error: unpack requires a buffer of 4 bytes HOT 1
- error: construct.core.PaddingError: subcon parsed more bytes than was allowed by length HOT 4
- RuntimeError: bad object parse HOT 2
- AI learning from recordings HOT 3
- Full summary isn't working HOT 5
- Consider add documentation? HOT 1
- Read chapter information HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aoc-mgz.