Closed eads closed 12 years ago
Well candidates do not in fact have vote_totals, so let's take a look.
@eads which pull are you using? get_state?
Yup, this is using get_state('IL')
So at what point does it fail? The get_state call itself works for me.
Here's a boiled down version of this code:
for c in race.candidates:
vote_count = c.vote_total
Plenty of the candidates do have vote_total's...
Also I'm going to lobby to move our repos off unfuddle and onto github sooner rather than later. We're phasing out our current issue tracker, and not having our work on github is a big barrier to collaboration.
Thank god, that unfuddle thing is bizarre.
Sorry, it's been a bit since I've been in python-elections in earnest. Why in the shit do we assign vote totals to candidate objects but not define a self.vote_total in the object itself? MYSTERIES.
So yeah, I can fix this by adding
self.vote_total = 0
To the end of the Candidate init method. Makes sense to me. Does that seem like it would fuck with anything, @palewire?
Yeah. It's just redmine, but you pay for it and the UI is worse than if you hosted it yourself.
I just wrote the same patch. Seems sane...
Trying to load Illinois data and running into missing vote_total for certain candidates. The specific error:
AttributeError: 'Candidate' object has no attribute 'vote_total'
. Is this polluted data, similar to yesterday?Here are the bad illinois candidates, along with their ap_pol_number's: