omniscale / imposm3

Imposm imports OpenStreetMap data into PostGIS
http://imposm.org/docs/imposm3/latest/
Apache License 2.0
719 stars 157 forks source link

Error: pq: extra data after last expected column in query COPY #121

Closed hzhangic closed 7 years ago

hzhangic commented 7 years ago

I created a customized mapping yml file to import highway data into postgreSQL. When imposm3 tried to write the data from cache at 98.8%, I got the following error:

[WARN] [mapping] unhandled type: [Sep 22 21:53:20] [8s] ...... [PostGIS] SQL Error: pq: extra data after last expected column in query COPY "import"."osm_roads" ("osm_id", "geometry", "type", "name", "tunnel", "bridge", "oneway", "ref", "z-order", "access", "service", "class", "maxspeed", "lanes", "surface", "is_in", "source", "attribution") FROM STDIN ([3191805 ...... residential Seymour Street 0 0 0 3 highway <nil> <nil> ])

What could be the causes of this issue, and how should I try to resolve it? Thanks!

ImreSamu commented 7 years ago

I created a customized mapping yml ... What could be the causes of this issue, and how should I try to resolve it?

['[WARN] [mapping] unhandled type ' ]

Could you double re-check your "customized mapping yml" type: definitions?

my suggestion for testing :

hzhangic commented 7 years ago

I found the problem: I accidentally capitalized "Name" and "Type" in my mapping yml file. After I change them back to "name" and "type", imposm works...