Skip to content

Geolytica format is inconsistent with implementation #395

@bkuczenski

Description

@bkuczenski

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions