Closed crass closed 4 years ago
@crass Thanks - the metadata API currently is down, so the core repository won't work at the moment. We're working on a fix for this.
Is the data returned by the metadata API the same as the data found in the metadata repo? It seems like there could be code to optionally get the data locally. Iirc, I saw an issue somewhere that you guys wanted to move away from an API server to hosting the metadata statically (presumably the API server logic would be moved client side, in which case much of the same code could be used for local metadata).
And while the API being down is the root cause, I consider this bug to be more about the misleading exception.
@crass Yes, the data is the same, and having the option (or just replacing the API with the local data) is our goal.
But fair point about the exception.
Any news on the metadata API server? Hard to do anything without it.
Hey folks, we've pushed a change that uses the JSON from the newly static metadata API. Kick the tires and let us know how it works for you.
cc @jslap
I've followed the instructions to get an OpenElections environment setup. However, I ran into this exception:
I've determined after some debugging that this is happening because
elec_api.find('tx')
is returningRequest raised error: 500 (state: tx, datefilter: )
. This can be seen by runningcurl -v 'http://openelections.net/api/v1/election/?state__postal__iexact=tx'
.In order to make this issue less hidden, I suggest that
find
inopenelex/api/elections.py
should raise an exception when theresponse.status_code
is not200
.