emacsen / changemonger

An OpenStreetMap change analyzer
GNU Affero General Public License v3.0
15 stars 4 forks source link

Keyerror '_action' during chageset parsing #15

Closed u14183 closed 12 years ago

u14183 commented 12 years ago

If calling http://localhost:5000/changeset?id=11770492

u14183 commented 12 years ago

INFO:werkzeug:127.0.0.1 - - [01/Oct/2012 11:31:47] "GET /changeset?id=11770492 HTTP/1.1" 500 - DEBUG:root:Retrieving http://api.openstreetmap.org/api/0.6/changeset/11770492 for changeset 11770492 metadata DEBUG:root:Retrieving http://api.openstreetmap.org/api/0.6/changeset/11770492/download for changeset 11770492 data ERROR:main:Exception on /changeset [GET] Traceback (most recent call last): File "/usr/lib/python2.6/site-packages/flask/app.py", line 1687, in wsgi_app response = self.full_dispatch_request() File "/usr/lib/python2.6/site-packages/flask/app.py", line 1360, in full_dispatch_request rv = self.handle_user_exception(e) File "/usr/lib/python2.6/site-packages/flask/app.py", line 1358, in full_dispatch_request rv = self.dispatch_request() File "/usr/lib/python2.6/site-packages/flask/app.py", line 1344, in dispatch_request return self.view_functionsrule.endpoint File "app.py", line 89, in display_changeset cset = helpers.get_changeset_or_404(id) File "/tmp/changemonger/helpers.py", line 38, in get_changeset_or_404 return changemonger.changeset(id) File "/tmp/changemonger/changemonger.py", line 66, in changeset change = parser.parseChange(xml) File "/tmp/changemonger/parser.py", line 58, in parseChange ele['_action'] == action.tag KeyError: '_action'

emacsen commented 12 years ago

This was due to a typo (a == instead of =) and has been fixed.