Modify

Opened 11 years ago

Closed 11 years ago

#11055 closed defect (fixed)

UnicodeEncodeError when using testcase-name with non-ascii-characters

Reported by: kwuenschel@… Owned by: Roberto Longobardi
Priority: normal Component: TestManagerForTracPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.12

Description

How to Reproduce

Create a testcase with a non-ascii-character in name (e.g. "öäü"). When viewing this testcase in trac, a UnicodeDecodeError is raised.

The attached patch fixed the problem for me.

Request parameters:

{'a': u'a', 'page': u'TC_TT5_TT8_TT10_TC23'}

User agent: Mozilla/5.0 (Windows NT 6.1; rv:20.0) Gecko/20100101 Firefox/20.0

System Information

Trac 0.12.3
Babel 0.9.6
Docutils 0.8.1
Genshi 0.6
Pygments 1.5
pysqlite 2.6.3
Python 2.7.3 (default, Jan 2 2013, 16:53:07)
[GCC 4.7.2]
pytz 2012c
setuptools 0.6
SQLite 3.7.13
Subversion 1.6.17 (r1128011)
jQuery 1.7.2

Enabled Plugins

TestManager 1.6.1
TracAccountManager 0.5dev
TracGenericClass 1.1.5
TracGenericWorkflow 1.0.4
TracWikiPrintPlugin 1.9.2
TracWysiwyg 0.12.0.3

Python Traceback

Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/trac/web/main.py", line 522, in _dispatch_request
    dispatcher.dispatch(req)
  File "/usr/lib/python2.7/dist-packages/trac/web/main.py", line 264, in dispatch
    content_type)
  File "/usr/lib/python2.7/dist-packages/trac/web/chrome.py", line 838, in render_template
    stream |= self._filter_stream(req, method, filename, stream, data)
  File "/usr/lib/python2.7/dist-packages/genshi/core.py", line 132, in __or__
    return Stream(_ensure(function(self)), serializer=self.serializer)
  File "/usr/lib/python2.7/dist-packages/trac/web/chrome.py", line 994, in inner
    data)
  File "build/bdist.linux-x86_64/egg/testmanager/wiki.py", line 147, in filter_stream
    return self._testcase_wiki_view(req, formatter, planid, page_name, stream)
  File "build/bdist.linux-x86_64/egg/testmanager/wiki.py", line 428, in _testcase_wiki_view
    summary = str(test_case.title)
UnicodeEncodeError: 'ascii' codec can't encode character u'\xfc' in position 27: ordinal not in range(128)

Attachments (1)

testmanager.patch (496 bytes) - added by kwuenschel@… 11 years ago.

Download all attachments as: .zip

Change History (4)

Changed 11 years ago by kwuenschel@…

Attachment: testmanager.patch added

comment:1 Changed 11 years ago by Roberto Longobardi

Status: newassigned

Hi, problems like this periodically come out again :D

I assume you are using TestManagerForTracPlugin 1.6.1, right?

Thanks for fixing this. I'll try to release an updated verison of the plugin asap.

Ciao, Roberto

comment:2 in reply to:  1 Changed 11 years ago by klaus

Replying to seccanj:

Hi, problems like this periodically come out again :D

I assume you are using TestManagerForTracPlugin 1.6.1, right?

Thanks for fixing this. I'll try to release an updated verison of the plugin asap.

Ciao, Roberto

Yes, I use version 1.6.1.

comment:3 Changed 11 years ago by Roberto Longobardi

Resolution: fixed
Status: assignedclosed

Patch included in 1.6.2. Thanks.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Roberto Longobardi.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


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

 
Note: See TracTickets for help on using tickets.