Opened 12 years ago

Closed 12 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

Description

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/main.py", line 503, in _dispatch_request
    dispatcher.dispatch(req)
  File "/usr/lib/python2.7/site-packages/trac/web/main.py", line 233, in dispatch
    content_type)
  File "/usr/lib/python2.7/site-packages/trac/web/chrome.py", line 968, in render_template
    stream |= self._filter_stream(req, method, filename, stream, data)
  File "/usr/lib/python2.7/site-packages/genshi/core.py", line 132, in __or__
    return Stream(_ensure(function(self)), serializer=self.serializer)
  File "/usr/lib/python2.7/site-packages/trac/web/chrome.py", line 1147, in inner
    data)
  File "build/bdist.linux-i686/egg/attachmentflags/web_ui.py", line 167, in filter_stream
    stream = self._filter_obsolete_attachments_from_stream(stream, data["attachments"]["attachments"])
  File "build/bdist.linux-i686/egg/attachmentflags/web_ui.py", 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/urllib.py", line 1268, in quote
    return ''.join(map(quoter, s))
KeyError: u'\u200b'

Change History (3)

comment:1 by przemub, 12 years ago

Suddenly it began to work... Sorry.

comment:2 by diver, 12 years ago

That's because I've deleted this attachment: "https://dev.haiku-os.org/attachment/ticket/8519/gci2012-expander-patch-8519.diff%E2%80%8B"

Before that I got:

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

While trying to open #8519.

comment:3 by nielx, 12 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.