ushahidi / geograpy

Extract countries, regions and cities from a URL or text
219 stars 133 forks source link

AttributeError: 'NoneType' object has no attribute 'name' #35

Open cusco opened 4 years ago

cusco commented 4 years ago

p = geograpy.get_place_context(text='Pristina')

Traceback (most recent call last): File "", line 1, in File "/home/cusco/VirtualEnvs/data_parser/lib/python3.7/site-packages/geograpy/init.py", line 12, in get_place_context pc.set_cities() File "/home/cusco/VirtualEnvs/data_parser/lib/python3.7/site-packages/geograpy/places.py", line 160, in set_cities country_name = country.name AttributeError: 'NoneType' object has no attribute 'name'

'NoneType' object has no attribute 'name'

jamiebull1 commented 4 years ago

https://github.com/Corollarium/geograpy2

cusco commented 4 years ago

https://github.com/Corollarium/geograpy2

Is this a fork?

jamiebull1 commented 4 years ago

From the README:

A rewrite that fixes more issues is available here, please use it instead: https://github.com/Corollarium/geograpy2

jamiebull1 commented 4 years ago

From the README:

A rewrite that fixes more issues is available here, please use it instead: https://github.com/Corollarium/geograpy2

Although it's also unmaintained since 2015...

cusco commented 4 years ago

From the README:

A rewrite that fixes more issues is available here, please use it instead: https://github.com/Corollarium/geograpy2

Although it's also unmaintained since 2015...

Right..! Thank you

jamiebull1 commented 4 years ago

@cusco there are a lot of forks of this package. Maybe you can find one that's in a better state.

cusco commented 4 years ago

@cusco there are a lot of forks of this package. Maybe you can find one that's in a better state.

Is there a particular one that you would suggest @jamiebull1 ?

jamiebull1 commented 4 years ago

@cusco afraid not. I don't have a use for this toola t the moment

WolfgangFahl commented 3 years ago

you might want to use the more recent https://github.com/somnathrakshit/geograpy3