Subscribed unsubscribe Subscribe Subscribe

LinuxでTicketExtPlugin動いた!!

Python、余り分かっていませんが、template_admin.pyの44行目を以下のように修正すると動くようになりました。日本語文字列の前に"u"を付けただけです。
エラーとなっていたのはLinuxだからなのか、Python2.4からなのかは不明ですが。。。

yield ('ticket', u'チケットシステム', 'template_admin', u'チケットテンプレート')

ちなみに出ていたエラーは以下。

Trac detected an internal error:

UnicodeDecodeError: 'ascii' codec can't decode byte 0xe3 in position 0: ordinal not in range(128)

File "/usr/lib/python2.4/site-packages/trac/web/main.py", line 423, in _dispatch_request
dispatcher.dispatch(req)
File "/usr/lib/python2.4/site-packages/trac/web/main.py", line 219, in dispatch
data, content_type)
File "/usr/lib/python2.4/site-packages/trac/web/chrome.py", line 715, in render_template
return stream.render(method, doctype=doctype)
File "/usr/lib64/python2.4/site-packages/genshi/core.py", line 179, in render
return encode(generator, method=method, encoding=encoding, out=out)
File "/usr/lib64/python2.4/site-packages/genshi/output.py", line 60, in encode
return _encode(u''.join(list(iterator)))
File "/usr/lib64/python2.4/site-packages/genshi/output.py", line 311, in __call__
for kind, data, pos in stream:
File "/usr/lib64/python2.4/site-packages/genshi/output.py", line 753, in __call__
for kind, data, pos in stream:
File "/usr/lib64/python2.4/site-packages/genshi/output.py", line 592, in __call__
for kind, data, pos in stream:
File "/usr/lib64/python2.4/site-packages/genshi/output.py", line 707, in __call__
text = mjoin(textbuf, escape_quotes=False)