Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion sc2reader/engine/plugins/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,10 @@ def handleAbilityEvent(self, event, replay):
event.logger.error(replay.filename)
event.logger.error("Release String: "+replay.release_string)
for player in replay.players:
event.logger.error("\t"+unicode(player).encode('ascii', 'ignore'))
try:
event.logger.error("\t"+unicode(player).encode('ascii', 'ignore'))
except:
event.logger.error("\t"+player.__str__())

self.logger.error("{0}\t{1}\tMissing ability {2:X} from {3}".format(event.frame, event.player.name, event.ability_id, replay.datapack.__class__.__name__))

Expand Down
12 changes: 9 additions & 3 deletions sc2reader/engine/plugins/creeptracker.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
# -*- coding: utf-8 -*-
from __future__ import absolute_import, print_function, unicode_literals, division

from sets import Set
try:
from sets import Set
except:
Set = set
from PIL.Image import open as PIL_open
from PIL.Image import ANTIALIAS
from StringIO import StringIO
from PIL.Image import ANTIALIAS
try:
from StringIO import StringIO
except:
pass
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i'm struggling to understand how pass can work here. isnt some kind of StringIO import required in order for the code to be able to work?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My bad, I'm fixing this right now.

from collections import defaultdict
from itertools import tee

Expand Down