Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Geolytica format is inconsistent with implementation #395

Open
bkuczenski opened this issue Aug 15, 2019 · 1 comment · May be fixed by #396
Open

Geolytica format is inconsistent with implementation #395

bkuczenski opened this issue Aug 15, 2019 · 1 comment · May be fixed by #396

Comments

@bkuczenski
Copy link

Reproduce:

>>> import geocoder
>>> g = geocoder.geolytica('Winfield, BC')
...
/data/virtualenvs/lca-tools/lib/python3.7/site-packages/geocoder/geolytica.py in street(self)
 39     @property
 40     def street(self):
---> 41         return self._standard.get('staddress', '').strip()
 42 
 43     @property
AttributeError: 'dict' object has no attribute 'strip'

This is because geolytica apparently returns empty dicts for staddress and stnumber if not present, and not empty strings.

Solution: either catch the AttributeError or modify the code to meet expectations.

@bkuczenski
Copy link
Author

sorry I am still learning how to do pull requests

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant