Opened 10 years ago

Closed 6 years ago

#1444 closed defect (wontfix)

tiledata2/initialParse: UnicodeEncodeError

Reported by: simon.legner@… Owned by: ojw
Priority: major Milestone:
Component: utils Version:
Keywords: tiledata2 python exception unicode Cc:

Description

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)

Change History (1)

comment:1 Changed 6 years ago by iandees

Resolution: wontfix
Status: newclosed

Cleaning aging tickets.

Note: See TracTickets for help on using tickets.