You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Plymouth Minnesota
Traceback (most recent call last):
File "C:\Users\m184194\Documents\Mayo\Projects\Patten_Facebook\scripts\facebook-friends-map\test.py", line 14, in
get_zipcode(current_city)
File "C:\Users\m184194\Documents\Mayo\Projects\Patten_Facebook\scripts\facebook-friends-map\test.py", line 9, in get_zipcode
zipcodes = engine.by_city_and_state(city=city, state=state)
File "C:\Users\m184194\Anaconda3\envs\social_media\lib\site-packages\uszipcode\search.py", line 802, in by_city_and_state
return self.query(
File "C:\Users\m184194\Anaconda3\envs\social_media\lib\site-packages\uszipcode\search.py", line 536, in query
city = self.find_city(city, state, best_match=True)[0]
File "C:\Users\m184194\Anaconda3\envs\social_media\lib\site-packages\uszipcode\search.py", line 379, in find_city
raise ValueError("'%s' is not a valid city name" % city)
ValueError: 'Ely' is not a valid city name
Exception ignored in: <function SearchEngine.del at 0x0000025E482668C0>
Traceback (most recent call last):
Sample code to reproduce the problem
from uszipcode import SearchEngine
engine = SearchEngine()
def get_zipcode(current_city):
city = current_city.split(",")[0].strip()
state = current_city.split(",")[1].strip()
print(city, state)
zipcodes = engine.by_city_and_state(city=city, state=state)
for zipcode in zipcodes:
print(zipcode.zipcode, zipcode.major_city, zipcode.population)
Describe the problem
Plymouth Minnesota
Traceback (most recent call last):
File "C:\Users\m184194\Documents\Mayo\Projects\Patten_Facebook\scripts\facebook-friends-map\test.py", line 14, in
get_zipcode(current_city)
File "C:\Users\m184194\Documents\Mayo\Projects\Patten_Facebook\scripts\facebook-friends-map\test.py", line 9, in get_zipcode
zipcodes = engine.by_city_and_state(city=city, state=state)
File "C:\Users\m184194\Anaconda3\envs\social_media\lib\site-packages\uszipcode\search.py", line 802, in by_city_and_state
return self.query(
File "C:\Users\m184194\Anaconda3\envs\social_media\lib\site-packages\uszipcode\search.py", line 536, in query
city = self.find_city(city, state, best_match=True)[0]
File "C:\Users\m184194\Anaconda3\envs\social_media\lib\site-packages\uszipcode\search.py", line 379, in find_city
raise ValueError("'%s' is not a valid city name" % city)
ValueError: 'Ely' is not a valid city name
Exception ignored in: <function SearchEngine.del at 0x0000025E482668C0>
Traceback (most recent call last):
Sample code to reproduce the problem
from uszipcode import SearchEngine
engine = SearchEngine()
def get_zipcode(current_city):
city = current_city.split(",")[0].strip()
state = current_city.split(",")[1].strip()
print(city, state)
zipcodes = engine.by_city_and_state(city=city, state=state)
for zipcode in zipcodes:
print(zipcode.zipcode, zipcode.major_city, zipcode.population)
current_city = "Plymouth, Minnesota"
get_zipcode(current_city)
engine.close()
Potential Solution
Maybe you can try talk to the author lively here https://gitter.im/MacHu-GWU-Python-Library-Technical-Support/community
The text was updated successfully, but these errors were encountered: