Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IndexError: Unknown user message cmd: 100 #4

Closed
fables-tales opened this issue Feb 8, 2013 · 4 comments
Closed

IndexError: Unknown user message cmd: 100 #4

fables-tales opened this issue Feb 8, 2013 · 4 comments

Comments

@fables-tales
Copy link

I'm parsing the attached replay using dota2py.summary.DemoSummary using the following code snippet

class GameResult:
    def __init__(self, filename):
        self._dem_parser = dota2py.summary.DemoSummary(filename)
        self._dem_parser.parse()
        self._dem_parser.print_info()

Replay at: http://samphippen.com/58905427.dem and I'm getting the following error trace

Parsing demo 'replays/58905427.dem' for game information
---------------------------------------------------------------------------
IndexError                                Traceback (most recent call last)
<ipython-input-2-5cc1d0c889f8> in <module>()
----> 1 esult = meepo.GameResult("replays/58905427.dem")

/Users/sam/dev/meepo/meepo/game_result.pyc in __init__(self, filename)
      4     def __init__(self, filename):
      5         self._dem_parser = dota2py.summary.DemoSummary(filename)
----> 6         self._dem_parser.parse()
      7         self._dem_parser.print_info()
      8 

/Users/sam/dev/meepo/venv/lib/python2.7/site-packages/dota2py/summary.pyc in parse(self)
    206                 self.parse_overhead_event,
    207         })
--> 208         self.dp.parse()
    209 
    210         for hero, player in self.heroes.iteritems():

/Users/sam/dev/meepo/venv/lib/python2.7/site-packages/dota2py/parser.pyc in parse(self)
    318                 self.worthless(message)
    319 
--> 320                 self.run_hooks(message)
    321 
    322                 self.info('|%s' % ('-' * 79, ))

/Users/sam/dev/meepo/venv/lib/python2.7/site-packages/dota2py/parser.pyc in run_hooks(self, packet)
    185 
    186         if packet.__class__ in self.internal_hooks:
--> 187             self.internal_hooks[packet.__class__](packet)
    188 
    189         if packet.__class__ in self.hooks:

/Users/sam/dev/meepo/venv/lib/python2.7/site-packages/dota2py/parser.pyc in parse_demo_packet(self, packet)
    238             self.worthless(message)
    239 
--> 240             self.run_hooks(message)
    241 
    242     def parse_user_message(self, message):

/Users/sam/dev/meepo/venv/lib/python2.7/site-packages/dota2py/parser.pyc in run_hooks(self, packet)
    185 
    186         if packet.__class__ in self.internal_hooks:
--> 187             self.internal_hooks[packet.__class__](packet)
    188 
    189         if packet.__class__ in self.hooks:

/Users/sam/dev/meepo/venv/lib/python2.7/site-packages/dota2py/parser.pyc in parse_user_message(self, message)
    243         cmd = message.msg_type
    244         if cmd not in messages.COMBINED_USER_MESSAGE_TYPES:
--> 245             raise IndexError("Unknown user message cmd: %s" % (cmd, ))
    246 
    247         reader = Reader(StringIO(message.msg_data))

IndexError: Unknown user message cmd: 100
@andrewsnowden
Copy link
Owner

I suspect this is because of some new updates to the replay format. I'll try and have a look at this on Monday and update the parser with all the new information they have added recently.

@fables-tales
Copy link
Author

thanks @andrewsnowden 🌈 👍 🍻 🌺

@andrewsnowden
Copy link
Owner

I've updated the protobuf files and a few bits of code, would you mind running it again and see if you still get the error?

@fables-tales
Copy link
Author

That has fixed it as far as I can tell. Thanks 🌸

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants