Opened 8 years ago

Closed 8 years ago

#9252 closed bug (fixed)

KeyError: u'\u200b'

Reported by: przemub Owned by: haiku-web
Priority: normal Milestone:
Component: Website/Trac Version:
Keywords: Cc:
Blocked By: Blocking:
Platform: All


How to Reproduce

While doing a GET operation on /ticket/8519, Trac issued an internal error.

Ticket #8519 broke when I was adding a patch. Now I do not have access to it from any device.

Request parameters:

{'id': u'8519'}

User agent: Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20100101 Firefox/16.0 Iceweasel/16.0.1

Python Traceback

Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/trac/web/", line 503, in _dispatch_request
  File "/usr/lib/python2.7/site-packages/trac/web/", line 233, in dispatch
  File "/usr/lib/python2.7/site-packages/trac/web/", line 968, in render_template
    stream |= self._filter_stream(req, method, filename, stream, data)
  File "/usr/lib/python2.7/site-packages/genshi/", line 132, in __or__
    return Stream(_ensure(function(self)), serializer=self.serializer)
  File "/usr/lib/python2.7/site-packages/trac/web/", line 1147, in inner
  File "build/bdist.linux-i686/egg/attachmentflags/", line 167, in filter_stream
    stream = self._filter_obsolete_attachments_from_stream(stream, data["attachments"]["attachments"])
  File "build/bdist.linux-i686/egg/attachmentflags/", line 232, in _filter_obsolete_attachments_from_stream
    href = "/attachment/%s/%s/%s" % (attachment.parent_realm, attachment.parent_id, urllib.quote(attachment.filename))
  File "/usr/lib/python2.7/", line 1268, in quote
    return ''.join(map(quoter, s))
KeyError: u'\u200b'

Change History (3)

comment:1 by przemub, 8 years ago

Suddenly it began to work... Sorry.

comment:2 by diver, 8 years ago

That's because I've deleted this attachment: ""

Before that I got:

Trac detected an internal error: KeyError: u'\u200b'

While trying to open #8519.

comment:3 by nielx, 8 years ago

Resolution: fixed
Status: newclosed

It looks like a problem with unicode file names. I was considering opening a ticket upstream, but this problem was caused by a very obscure file, so if another case presents itself then let's reopen.

Note: See TracTickets for help on using tickets.