Getting the new_data branch to compile

18 views
Skip to first unread message

David Joerg

unread,
Jan 2, 2012, 3:07:05 PM1/2/12
to sc2reader
Hello all, has anyone tried to compile the new_data branch from a
clean checkout?

I'm doing that now and running into some problems. But maybe I'm
doing it wrong?

The first problem I encountered was trivial to fix, and I've sent a
pull request for the fix.

The second one is:
KeyError: "Ability codes shouldn't duplicate: 0 => Right click in fog,
Cancel!"

Full trace below. I'm working on figuring it out & fixing it now, but
if someone already knows what the problem is, or I'm not supposed to
really be working with this branch, I'd love to hear about it!
Thanks, --David J.


bash-3.2$ python setup.py develop
Traceback (most recent call last):
File "setup.py", line 2, in <module>
from sc2reader import __version__ as version
File "/Users/david/Dropbox/Programming/sc2reader_2ndtry/sc2reader/
sc2reader/__init__.py", line 31, in <module>
from sc2reader import config, objects, utils, processors,
exceptions
File "/Users/david/Dropbox/Programming/sc2reader_2ndtry/sc2reader/
sc2reader/config.py", line 3, in <module>
from sc2reader import readers as r
File "/Users/david/Dropbox/Programming/sc2reader_2ndtry/sc2reader/
sc2reader/readers.py", line 4, in <module>
from sc2reader.objects import *
File "/Users/david/Dropbox/Programming/sc2reader_2ndtry/sc2reader/
sc2reader/objects.py", line 6, in <module>
from sc2reader.data import DataObject
File "/Users/david/Dropbox/Programming/sc2reader_2ndtry/sc2reader/
sc2reader/data/__init__.py", line 4, in <module>
from sc2reader.data.v110_113 import Data_110_113
File "/Users/david/Dropbox/Programming/sc2reader_2ndtry/sc2reader/
sc2reader/data/v110_113.py", line 6, in <module>
class Data_110_113(BaseData):
File "/Users/david/Dropbox/Programming/sc2reader_2ndtry/sc2reader/
sc2reader/data/utils.py", line 119, in __new__
pull_abilities(cls)
File "/Users/david/Dropbox/Programming/sc2reader_2ndtry/sc2reader/
sc2reader/data/utils.py", line 36, in pull_abilities
pull_abilities(base)
File "/Users/david/Dropbox/Programming/sc2reader_2ndtry/sc2reader/
sc2reader/data/utils.py", line 36, in pull_abilities
pull_abilities(base)
File "/Users/david/Dropbox/Programming/sc2reader_2ndtry/sc2reader/
sc2reader/data/utils.py", line 36, in pull_abilities
pull_abilities(base)
File "/Users/david/Dropbox/Programming/sc2reader_2ndtry/sc2reader/
sc2reader/data/utils.py", line 44, in pull_abilities
raise KeyError(msg.format(code, name, cls.abilities[code]))
KeyError: "Ability codes shouldn't duplicate: 0 => Right click in fog,
Cancel!"

David Joerg

unread,
Jan 2, 2012, 3:16:49 PM1/2/12
to sc2reader
Having looked a little more, it seems as if the new_data branch is more or less designed not to compile until the various data/v*.py files have been filled in with distinct (if not correct) codes for the various abilities.

Would it be better to comment out the appropriate lines in __init__.py until the codes have been filled in, so that the code can be checked out and compiled cleanly?

--David J    [ twitter   blog   calendar   meetup: drink for america  ]

Graylin Kim

unread,
Jan 4, 2012, 11:14:08 AM1/4/12
to sc2r...@googlegroups.com
I looked into this and you're right David.

I had some hard constraints enabled to validate the data dictionaries that needed to be turned off once the template files had been put in. I also realized that I had made a few changes in the branch that broke the setup.py process so I've pushed those changes as well.

So anyone interested in using the library now should be able to `python setup.py install` from a clean pull and have no difficulties.

Let me know if this is still not the case.

David Joerg

unread,
Jan 4, 2012, 12:13:13 PM1/4/12
to sc2r...@googlegroups.com
Thanks Graylin, awesome!
Reply all
Reply to author
Forward
0 new messages