Closed eads closed 11 years ago
Yes. I hit this error today too. There are IDs in the AP results file that do not appear in the "init" files with all the metadata about candidates and races. I've contacted AP but yet to hear back.
In the mean time, I pushed a hack that will "continue" and skip results rows that are not in the inits file for now. Once we hear back from AP on the source of the issue, we'll make a better fix.
And, FTR, this error didn't occur until they updated the inits files today, so I suspect something is off there. Though it's possible we're reaching in and grabbing the wrong inits.
here's that patch, which is now in the master branch https://github.com/datadesk/python-elections/commit/6a91788a9dc7c2cc1966c608ddeb6ab0a12cd15a
Thanks, Ben. we've been building with mocked data so I could work around the designer's schedule, so today is the first I've been working in earnest with the elections lib. Apparently I picked a good day (: On Oct 9, 2012 4:38 PM, "Ben Welsh" notifications@github.com wrote:
here's that patch, which is now in the master branch datadesk/python-elections@6a91788https://github.com/datadesk/python-elections/commit/6a91788a9dc7c2cc1966c608ddeb6ab0a12cd15a
— Reply to this email directly or view it on GitHubhttps://github.com/datadesk/python-elections/issues/71#issuecomment-9280979.
Yeah, it's all coming together on the runway here, as you can tell. Also, don't miss the new undocumented get_presidential_summary method if you're looking to do a 50 state map.
Yup, already found it. Looks incredibly handy.
AP says
That race, 6433 in AR, was updated today, to candidates For and Against, and will be reflected in the US.txt and in the US pol file in tomorrow’s test. It will be candidates 12040 and 12041. t;2012-11-06;AR;1;0;Arkansas;6433;I;G;1;Issue;5 - Medical Marijuana;;Ballot Issue;Allow Medical Marijuana;1;0;0;2393;12040;1;;;;For;;0;0;0;;2;12041;2;;;;Against;;0;0;0;;3; pol init: | 12040|||For |For | | | 6433| 2| 1| 8190|AR | | 12041|||Against |Against | | | 6433| 3| 2| 8191|AR
Here's the trace: