This is a static archive of our old OSM Help Site. Please post any new questions and answers at community.openstreetmap.org.

defaultmapping.py

0

Hi I have a problem rendering my map. When I run the imposm --read command I receive the following error

john@c2appsgeo02a:/data/dump$ sudo imposm --read --overwrite-cache quebec-latest.osm.pbf
Traceback (most recent call last):
  File "/usr/bin/imposm", line 9, in <module>
    load_entry_point('imposm==2.3.2', 'console_scripts', 'imposm')()
  File "/usr/lib/python2.7/dist-packages/imposm/app.py", line 154, in main
    execfile(mapping_file, mappings)
  File "/usr/lib/python2.7/dist-packages/imposm/defaultmapping.py", line 417, in <module>
    '__any__',
TypeError: __init__() got an unexpected keyword argument 'with_type_field'

The error is coming from the following statements from the defaultmapping.py

point_addresses = Points(
    name = 'point_addresses',
    with_type_field = False,
    fields = (
        ('addr:street', String()),
        ('addr:postcode', String()),
        ('addr:city', String()),
        ('addr:country', String()),
        ('addr:housenumber', String()),
    ),
    mapping = {
        'addr:housenumber': (
            '__any__',
        ),
    }
)

polyline_addresses = LineStrings(
    name = 'polyline_addresses',
    with_type_field = False,
    fields = (
        ('addr:interpolation', String()),
        ),
    mapping = {
        'addr:interpolation': (
            '__any__',
        ),
    }
)

polygon_addresses = Polygons(
    name = 'polygon_addresses',
    with_type_field = False,
    fields = (
        ('addr:street', String()),
        ('addr:postcode', String()),
        ('addr:city', String()),
        ('addr:country', String()),
        ('addr:housenumber', String()),
    ),
    mapping = {
        'addr:housenumber': (
            '__any__',
        ),
    }
)

Any help would be appreciated

Thanks in advance

John

asked 10 Feb '15, 18:53

ArmyGuy62's gravatar image

ArmyGuy62
11112
accept rate: 0%

edited 10 Feb '15, 18:56

scai's gravatar image

scai ♦
33.3k21309459