michaeldrennen/Geonames

Importing data problem

Closed this issue Β· 4 comments

When i'm running

php artisan geonames:install --country=ru --language=ru

i get error :

SQLSTATE[22003]: Numeric value out of range: 1264 Out of range value for column 'isHistoric' at row 1 (SQL: insert into geonames_alternate_names_working (alternateNameId, geonameid, isolanguage, alternate_name, isPreferredName, isShortName, isColloquial, isHistoric, updated_at, created_at) values (9528154, 472757, en, Volgograd, 1, 0, 0, 1961, 2018-05-04 09:19:35, 2018-05-04 09:19:35))
/var/www/zdravproduct-app/vendor/laravel/framework/src/Illuminate/Database/Connection.php:664

Looks like isHistoric tinyint but trying insert value '1961'

Next problem

SQLSTATE[HY000]: General error: 1366 Incorrect string value: '\xF0\x90\x8D\x80\xF0\x90...' for column 'alternate_name' at row 1 (SQL: insert into geonames_alternate_names_working (alternateNameId, geonameid, isolanguage, alternate_name, isPreferredName, isShortName, isColloquial, isHistoric, updated_at, created_at) values (8198682, 509820, got, π€πŒ΄π„π‚π‰πŒΆπŒ°πŒΈπŒ°πŒΏπŒ³πƒπŒΊ42, 2018-05-04 09:34:42))

Let me look into it.

@michaelslobodskih What is your Character set and Collation for your alternate_names table?

For your first problem:
I ran the same install command that you did, and I did not receive an error.
I wonder if it's possible that Geonames updated their database record with a correct value.
Try running the command again.

As for your second problem, it looks like a charset/collation issue.
Check your database settings, and open a new ticket if that issue persists.
Thanks!