Opened 8 years ago

Last modified 7 years ago

#12886 closed defect

UnicodeError: source returned bytes, but no encoding specified — at Version 1

Reported by: Fabian.Scheler@… Owned by: Franz
Priority: normal Component: BudgetingPlugin
Severity: critical Keywords:
Cc: Trac Release: 1.0

Description (last modified by Jun Omae)

The stack trace looks like this:

File "/usr/local/lib/python2.7/dist-packages/trac/web/main.py", line 562, in _dispatch_request
  dispatcher.dispatch(req)
File "/usr/local/lib/python2.7/dist-packages/trac/web/main.py", line 269, in dispatch
  iterable=chrome.use_chunked_encoding)
File "/usr/local/lib/python2.7/dist-packages/trac/web/chrome.py", line 1079, in render_template
  stream |= self._filter_stream(req, method, filename, stream, data)
File "/usr/local/lib/python2.7/dist-packages/genshi/core.py", line 133, in __or__
  return Stream(_ensure(function(self)), serializer=self.serializer)
File "/usr/local/lib/python2.7/dist-packages/trac/web/chrome.py", line 1331, in inner
  data)
File "build/bdist.linux-x86_64/egg/ticketbudgeting/ticketbudgeting.py", line 327, in filter_stream
  stream |= Transformer('.//fieldset [@id="properties"]').after(HTML(fieldset))
File "/usr/local/lib/python2.7/dist-packages/genshi/input.py", line 442, in HTML
  return Stream(list(HTMLParser(BytesIO(text), encoding=encoding)))
File "/usr/local/lib/python2.7/dist-packages/genshi/core.py", line 273, in _ensure
  event = stream.next()
File "/usr/local/lib/python2.7/dist-packages/genshi/input.py", line 449, in _coalesce
  for kind, data, pos in chain(stream, [(None, None, None)]):
File "/usr/local/lib/python2.7/dist-packages/genshi/input.py", line 337, in _generate
  raise UnicodeError("source returned bytes, but no encoding specified")

This error should be caused by a missing adaptation for Genshi 0.7, the attached patch should solve the problem.

Change History (2)

Changed 8 years ago by anonymous

Attachment: ticketbudgeting.py.diff added

comment:1 Changed 8 years ago by Jun Omae

Description: modified (diff)
Note: See TracTickets for help on using tickets.