OSM-es / CatAtom2Osm

Tool to convert INSPIRE data sets from the Spanish Cadastre ATOM Services to OSM files.
BSD 2-Clause "Simplified" License
13 stars 6 forks source link

Error en osmxml.serialize para algunos municipios. #92

Closed javiersanp closed 2 years ago

javiersanp commented 2 years ago

Ocurre en 03068 09400 12037 12103 19327 22303 22332

Traceback (most recent call last):
  File "/usr/lib/python3.8/runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.8/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/opt/CatAtom2Osm/catatom2osm/__main__.py", line 156, in <module>
    run()
  File "/opt/CatAtom2Osm/catatom2osm/__main__.py", line 142, in run
    process(options)
  File "/opt/CatAtom2Osm/catatom2osm/__main__.py", line 67, in process
    CatAtom2Osm.create_and_run(a_path, o)
  File "/opt/CatAtom2Osm/catatom2osm/app.py", line 85, in create_and_run
    app.run()
  File "/opt/CatAtom2Osm/catatom2osm/app.py", line 120, in run
    self.stop_address()
  File "/opt/CatAtom2Osm/catatom2osm/app.py", line 470, in stop_address
    self.write_osm(self.address_osm, 'address.osm')
  File "/opt/CatAtom2Osm/catatom2osm/app.py", line 764, in write_osm
    osmxml.serialize(file_obj, data)
  File "/opt/CatAtom2Osm/catatom2osm/osmxml.py", line 37, in serialize
    e.append(etree.Element('tag', dict(k=key, v=value)))
  File "src/lxml/etree.pyx", line 3020, in lxml.etree.Element
  File "src/lxml/apihelpers.pxi", line 131, in lxml.etree._makeElement
  File "src/lxml/apihelpers.pxi", line 119, in lxml.etree._makeElement
  File "src/lxml/apihelpers.pxi", line 323, in lxml.etree._initNodeAttributes
  File "src/lxml/apihelpers.pxi", line 334, in lxml.etree._addAttributeToNode
  File "src/lxml/apihelpers.pxi", line 1538, in lxml.etree._utf8
TypeError: Argument must be bytes or unicode, got 'int'