Skip to content
This repository has been archived by the owner on Jul 24, 2021. It is now read-only.

tiledata2/initialParse: UnicodeEncodeError #1444

Closed
openstreetmap-trac opened this issue Jul 23, 2021 · 1 comment
Closed

tiledata2/initialParse: UnicodeEncodeError #1444

openstreetmap-trac opened this issue Jul 23, 2021 · 1 comment

Comments

@openstreetmap-trac
Copy link

Reporter: simon.legner[at]gmail.com
[Submitted to the original trac issue database at 5.54pm, Tuesday, 6th January 2009]

== Description ==
Executing the following command leads to an !UnicodeEncodeError.

bzcat austria.osm.bz2 | ./initialParse.py

== Remarks ==

  • Using tiledata2 rev 9924
  • Austrian place names often contain umlauts

== Output ==

Starting ways
Traceback (most recent call last):
  File "./initialParse.py", line 301, in <module>
    a = osmParser(sys.stdin, db)
  File "./initialParse.py", line 250, in __init__
    parser.parse(filename)
  File "/usr/lib/python2.6/site-packages/_xmlplus/sax/expatreader.py", line 109, in parse
    xmlreader.IncrementalParser.parse(self, source)
  File "/usr/lib/python2.6/site-packages/_xmlplus/sax/xmlreader.py", line 123, in parse
    self.feed(buffer)
  File "/usr/lib/python2.6/site-packages/_xmlplus/sax/expatreader.py", line 216, in feed
    self._parser.Parse(data, isFinal)
  File "/usr/lib/python2.6/site-packages/_xmlplus/sax/expatreader.py", line 315, in end_element
    self._cont_handler.endElement(name)
  File "./initialParse.py", line 291, in endElement
    self.db.storeWay(self.wayID,self.waynodes,self.tags)
  File "./initialParse.py", line 162, in storeWay
    data += self.packWay(wid, waynodes, style, tags)
  File "./initialParse.py", line 206, in packWay
    packedTags += self.packTag("N", tags, 'name')
  File "./initialParse.py", line 216, in packTag
    string = str(string)
UnicodeEncodeError: 'ascii' codec can't encode character u'\xdf' in position 14: ordinal not in range(128)
@openstreetmap-trac
Copy link
Author

Author: iandees
[Added to the original trac issue at 9.46pm, Monday, 9th September 2013]

Cleaning aging tickets.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant