question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to port the heroprotocol to Python 3

See original GitHub issue

Let me start with saying that I’m not super experienced with Python yet but I’m learning gradually. Can you please assist when I am trying to port the heroprotocol to Python 3? I installed the required library and when I try to run header = protocol.decode_replay_header(mpq.header['user_data_header']['content']) I get this error: TypeError: ord() expected string of length 1, but int found. The error says that it’s in the decoders.py file on the row 69. Just to clarify, I am using latest Anaconda release. Thanks for any help.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:17 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
regnercommented, Nov 23, 2017

@Joko013 FYI you can put ``` around multiline code to make it more readable on GH:

for event in (events for events in tracker_events if events['_event'] == 'NNet.Replay.Tracker.SUnitDiedEvent'):
    for tr_event in (events2 for events2 in tracker_events2 if events2['_event'] == 'NNet.Replay.Tracker.SUnitBornEvent'):
        if event['m_unitTagIndex'] == tr_event['m_unitTagIndex'] and event['m_unitTagRecycle'] == tr_event['m_unitTagRecycle']:
            print tr_event['m_unitTypeName']

Also you you specify a language after the first ``` GH will style the code accordingly.

0reactions
Agilhardtcommented, Apr 20, 2020

Fixed in the next update

Read more comments on GitHub >

github_iconTop Results From Across the Web

heroprotocol - PyPI
heroprotocol is a Python library and command-line tool to decode Heroes of the Storm replay files into Python data structures.
Read more >
Porting Python 2 Code to Python 3 — Python 3.11.1 ...
This guide is meant to help you figure out how best to support both Python 2 & 3 simultaneously. If you are looking...
Read more >
Why does ord() fail when porting from Python 2 to Python 3?
I am trying to port a Python library called heroprotocol from Python 2 to Python 3. This library is used to parse replay...
Read more >
SwiftMPQ - a Swift 3 port of mpyq used to extract files from a ... - Reddit
SwiftMPQ is a Swift 3 library/command line tool i'm working on that provides functionality on par with the Python mpyq library used in...
Read more >
The Conservative Python 3 Porting Guide - Read the Docs
This document will guide you through porting your software to Python 3. It is geared towards projects that are being ported because support...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found