Created
September 11, 2014 14:46
-
-
Save no-reply/5987f96ca269d30c8d69 to your computer and use it in GitHub Desktop.
Akara module_config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In [10]: DplaGeonamesGeocoder().enrich_place(place) | |
--------------------------------------------------------------------------- | |
AttributeError Traceback (most recent call last) | |
<ipython-input-10-346d292dde39> in <module>() | |
----> 1 DplaGeonamesGeocoder().enrich_place(place) | |
/home/tjohnson/src/dpla/ingestion/ENV/lib/python2.7/site-packages/dplaingestion/akamod/geocode.pyc in enrich_place(self, place) | |
295 hierarchy = self.reverse_geocode_hierarchy(lat, lng, ["PCLI", # Country | |
296 "ADM1", # State | |
--> 297 "ADM2"]) # County | |
298 | |
299 for feature in hierarchy: | |
/home/tjohnson/src/dpla/ingestion/ENV/lib/python2.7/site-packages/dplaingestion/akamod/geocode.pyc in reverse_geocode_hierarchy(self, lat, lng, fcodes) | |
346 hierarchy = [] | |
347 | |
--> 348 geonames_item = self.reverse_geocode(lat, lng) | |
349 | |
350 import pdb; pdb.set_trace() | |
/home/tjohnson/src/dpla/ingestion/ENV/lib/python2.7/site-packages/dplaingestion/akamod/geocode.pyc in reverse_geocode(self, lat, lng) | |
327 params = { "lat": lat, | |
328 "lng": lng, | |
--> 329 "username": module_config().get("geonames_username")} | |
330 # "token": module_config().get("geonames_token") } | |
331 url = "http://ws.geonames.net/findNearbyJSON?%s" % urlencode(params) | |
/home/tjohnson/src/dpla/ingestion/ENV/lib/python2.7/site-packages/akara/__init__.pyc in module_config(path) | |
61 # akara_name = "akara.demo.xslt" | |
62 # | |
---> 63 for name, obj in raw_config.items(): | |
64 if name[:1] == "_": | |
65 continue | |
AttributeError: 'NoneType' object has no attribute 'items' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment