Code Monkey home page Code Monkey logo

Comments (6)

happyleavesaoc avatar happyleavesaoc commented on August 28, 2024 1

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.

happyleavesaoc avatar happyleavesaoc commented on August 28, 2024

Are you using the latest version of mgz? You'll need to git clone the repository to get it.

from aoc-mgz.

Guimoute avatar Guimoute commented on August 28, 2024

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.

Guimoute avatar Guimoute commented on August 28, 2024

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.

Guimoute avatar Guimoute commented on August 28, 2024

All the dependencies were installed properly apparently.

dependencies done

from aoc-mgz.

Guimoute avatar Guimoute commented on August 28, 2024

Ok, thank you so much for your fast reply!

from aoc-mgz.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.