Edgewall Software
Modify

Ticket #2904 (closed defect: invalid)

Opened 6 years ago

Last modified 6 years ago

Unicode error in Workflow Sandbox

Reported by: jdunham@… Owned by: cmlenz
Priority: normal Milestone:
Component: web frontend/mod_python Version: devel
Severity: normal Keywords:
Cc: snoetzel@…
Release Notes:
API Changes:

Description

I just installed the workflow sandbox version (http://svn.edgewall.com/repos/trac/sandbox/workflow, rev = 3025, last changed rev. = 2983)
, and I get the following error when clicking on most of my defined reports.
The box is running Linux Fedora Core4

Traceback (most recent call last):
  File "/usr/lib/python2.4/site-packages/trac/web/main.py", line 283, in dispatch_request
    dispatcher.dispatch(req)
  File "/usr/lib/python2.4/site-packages/trac/web/main.py", line 170, in dispatch
    resp = chosen_handler.process_request(req)
  File "/usr/lib/python2.4/site-packages/trac/ticket/report.py", line 90, in process_request
    resp = self._render_view(req, db, id)
  File "/usr/lib/python2.4/site-packages/trac/ticket/report.py", line 328, in _render_view
    absurls=(format == 'rss'))
  File "/usr/lib/python2.4/site-packages/trac/wiki/formatter.py", line 784, in wiki_to_html
    return util.Markup(out.getvalue())
  File "/usr/lib/python2.4/site-packages/trac/util/html.py", line 36, in __new__
    return unicode.__new__(self, text)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 30: ordinal not in range(128)

Some of the custom and built-in wiki pages have a similar problem, including
.../cgi-bin/trac.cgi/wiki/TracIni

Traceback (most recent call last):
  File "/usr/lib/python2.4/site-packages/trac/web/main.py", line 283, in dispatch_request
    dispatcher.dispatch(req)
  File "/usr/lib/python2.4/site-packages/trac/web/main.py", line 170, in dispatch
    resp = chosen_handler.process_request(req)
  File "/usr/lib/python2.4/site-packages/trac/wiki/web_ui.py", line 118, in process_request
    self._render_view(req, db, page)
  File "/usr/lib/python2.4/site-packages/trac/wiki/web_ui.py", line 366, in _render_view
    req.hdf['wiki.page_html'] = wiki_to_html(page.text, self.env, req)
  File "/usr/lib/python2.4/site-packages/trac/wiki/formatter.py", line 783, in wiki_to_html
    Formatter(env, req, absurls, db).format(wikitext, out, escape_newlines)
  File "/usr/lib/python2.4/site-packages/trac/wiki/formatter.py", line 638, in format
    result = re.sub(self.rules, self.replace, line)
  File "/usr/lib/python2.4/sre.py", line 142, in sub
    return _compile(pattern, 0).sub(repl, string, count)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 0: ordinal not in range(128)

I tried checking out 2983 explicitly and rebuilding and installing trac.cgi, but I get the same results

Attachments

Change History

comment:1 Changed 6 years ago by athomas

  • Resolution set to invalid
  • Status changed from new to closed

As the workflow sandbox hasn't been migrated to unicode yet, I suspect you are using trunk. Line 36 of util/html.py does not contain unicode.__new__(self, text) in workflow.

Perhaps you need to remove /usr/lib/python2.4/site-packages/trac completely and reinstall.

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
to The owner will be changed from cmlenz. Next status will be 'closed'
Author


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

 
Note: See TracTickets for help on using tickets.