Opened 3 years ago

Last modified 21 months ago

#11522 new defect

UnicodeError: source returned bytes, but no encoding specified

Reported by: barclay@… Owned by: seccanj
Priority: normal Component: FaqPlugin
Severity: blocker Keywords:
Cc: Trac Release: 1.0


From a fresh install, after applying the patch in #9976 for PostgreSQL, when I click on the main FAQs navigation button I get:

Trac detected an internal error:
UnicodeError: source returned bytes, but no encoding specified

Python callback:

File "build/bdist.macosx-10.9-intel/egg/trac/web/", line 497, in _dispatch_request
File "build/bdist.macosx-10.9-intel/egg/trac/web/", line 233, in dispatch
File "build/bdist.macosx-10.9-intel/egg/trac/web/", line 968, in render_template
  stream |= self._filter_stream(req, method, filename, stream, data)
File "/Library/Python/2.7/site-packages/Genshi-0.7-py2.7-macosx-10.9-intel.egg/genshi/", line 133, in __or__
  return Stream(_ensure(function(self)), serializer=self.serializer)
File "build/bdist.macosx-10.9-intel/egg/trac/web/", line 1147, in inner
File "build/bdist.macosx-10.9-intel/egg/faqplugin/", line 66, in filter_stream
  return self._faq_category_wiki_view(req, formatter, page_name, stream)
File "build/bdist.macosx-10.9-intel/egg/faqplugin/", line 91, in _faq_category_wiki_view
  HTML(tree_macro.expand_macro(formatter, None, ''))
File "/Library/Python/2.7/site-packages/Genshi-0.7-py2.7-macosx-10.9-intel.egg/genshi/", line 442, in HTML
  return Stream(list(HTMLParser(BytesIO(text), encoding=encoding)))
File "/Library/Python/2.7/site-packages/Genshi-0.7-py2.7-macosx-10.9-intel.egg/genshi/", line 273, in _ensure
  event =
File "/Library/Python/2.7/site-packages/Genshi-0.7-py2.7-macosx-10.9-intel.egg/genshi/", line 449, in _coalesce
  for kind, data, pos in chain(stream, [(None, None, None)]):
File "/Library/Python/2.7/site-packages/Genshi-0.7-py2.7-macosx-10.9-intel.egg/genshi/", line 337, in _generate
  raise UnicodeError("source returned bytes, but no encoding specified")

Note that I'm using Trac 1.0.1 with PostgreSQL, see attached

Attachments (1)

tracfaq.jpeg (297.1 KB) - added by barclay@… 3 years ago.
my setup

Download all attachments as: .zip

Change History (4)

Changed 3 years ago by barclay@…

my setup

comment:1 Changed 3 years ago by anonymous

My setup is:

my setup

comment:2 Changed 3 years ago by anonymous

  • Trac Release set to 1.0

comment:3 Changed 21 months ago by rjollos

You can work around by downgrading to Genshi 0.6.1.

Add Comment

Modify Ticket

as new The owner will remain seccanj.

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.