petewarden / geodict

A simple Python library/tool for pulling location information from unstructured text
http://petewarden.typepad.com/
184 stars 52 forks source link

Populate regions table #1

Open sh4rf opened 13 years ago

sh4rf commented 13 years ago

Hi Pete,

What an interesting work. I wanted to try your tool with my own data but I can't move forward with the population of the database. Population of cities and countries works fine, but regions table stay empty. Script populate_database.py flags me just a warning : "./populate_database.py:42: Warning: Data truncated for column 'city' at row 1 (city, country, region_code, population, lat, lon))"

Have you any idea? Thank you.

petewarden commented 13 years ago

Sorry you're hitting problems! Could you send me details of your system (eg the result of 'uname -a', MySQL version, etc and I'll see if I can figure out what's going wrong.

cheers, Pete

chenlianMT commented 9 years ago

I couldn't generate regions table either. I think the SQL command from the populate_database.py is correct, because I printed out and paste into mysql in terminal, and it works fine. I guess there might be some problems in the MySQLdb module.

Also, I found a mistake in us_statenames.csv. The 6th row "Colorado|CA" should be "Colorado|CO".