Modify

Opened 6 years ago

Closed 5 years ago

#3649 closed defect (duplicate)

UnicodeDecodeError when try deleting ticket changes

Reported by: vinogradniy@… Owned by: coderanger
Priority: normal Component: TicketDeletePlugin
Severity: normal Keywords:
Cc: Trac Release: 0.11

Description

I use Win1251 encoding and try deleting ticket changes ID 1, ticket and changes are exists.

Trac detected an internal error: 
UnicodeDecodeError: 'ascii' codec can't decode byte 0xcf in position 0: ordinal not in range(128)

If you think this should work you can reproduce the problem, you should consider reporting this to the Trac team.

Before you do that, though, please first try searching for similar issues, as it is quite likely that this problem has been reported before. For questions about installation and configuration of Trac, please try the mailing list instead of filing a ticket. 

Otherwise, please  a new ticket at the Trac project site, where you can describe the problem and explain how to reproduce it.
Python Traceback
Most recent call last: 
File "C:\Python24\Lib\site-packages\trac\web\main.py", line 423, in _dispatch_request
  dispatcher.dispatch(req)
File "C:\Python24\Lib\site-packages\trac\web\main.py", line 219, in dispatch
  data, content_type)
File "C:\Python24\Lib\site-packages\trac\web\chrome.py", line 726, in render_template
  stream.render(method, doctype=doctype, out=buffer)
File "C:\Python24\Lib\site-packages\genshi\core.py", line 179, in render
  return encode(generator, method=method, encoding=encoding, out=out)
File "C:\Python24\Lib\site-packages\genshi\output.py", line 61, in encode
  for chunk in iterator:
File "C:\Python24\Lib\site-packages\genshi\output.py", line 311, in __call__
  for kind, data, pos in stream:
File "C:\Python24\Lib\site-packages\genshi\output.py", line 753, in __call__
  for kind, data, pos in stream:
File "C:\Python24\Lib\site-packages\genshi\output.py", line 592, in __call__
  for kind, data, pos in stream:
File "C:\Python24\Lib\site-packages\genshi\output.py", line 707, in __call__
  text = mjoin(textbuf, escape_quotes=False)


System Information:

User Agent: Opera/9.52 (Windows NT 6.0; U; en)Trac:	0.11
Python:	2.4.3 (#69, Mar 29 2006, 17:35:34) [MSC v.1310 32 bit (Intel)]
setuptools:	0.6c7
SQLite:	3.5.2
pysqlite:	2.4.0
Genshi:	0.5
mod_python:	3.3.1
Subversion:	1.4.6 (r28521)
jQuery:	1.2.3

Attachments (4)

ticketdelete.patch (71.8 KB) - added by amalaev@… 6 years ago.
ticketdeleteplugin patcj
ticketdelete.2.patch (71.8 KB) - added by amalaev@… 6 years ago.
ticketdeleteplugin fully worked patch
ticketdelete_working_utffix.patch (14.5 KB) - added by amalaev@… 6 years ago.
created with tortoisesvn patch
ticketdelete_working_utffix.2.patch (62.2 KB) - added by amalaev@… 6 years ago.
Final fully working version of patch.

Download all attachments as: .zip

Change History (12)

comment:1 Changed 6 years ago by anonymous

I can only confirm this bug happens. Its not trivial as it prevents me from deleting ticket changes at all.

I would say your plugin should be integrated in standard Trac installation, and be tested very thoroughly.

comment:2 Changed 6 years ago by vinogradniy@…

Thanks.

Changed 6 years ago by amalaev@…

ticketdeleteplugin patcj

Changed 6 years ago by amalaev@…

ticketdeleteplugin fully worked patch

comment:3 Changed 6 years ago by amalaev@…

Try patch on 0.11 version of ticketdeleteplugin sources with ticketdelete.patch that i attached.

This is fully working for me.

comment:4 Changed 6 years ago by amalaev@…

my patch also includes ticketdeleteplugin_0.11_working.patch from http://trac-hacks.org/ticket/1749

comment:5 Changed 6 years ago by vinogradniy@…

Patch not work.
TortoiseSVN report error "the line indicating the new file was expected in line 6".

Changed 6 years ago by amalaev@…

created with tortoisesvn patch

Changed 6 years ago by amalaev@…

Final fully working version of patch.

comment:6 Changed 6 years ago by amalaev@…

i create new version of patch by TortoiseSVN, try it

comment:7 Changed 6 years ago by olistudent

Thanks for attached patch. It solved my problem.

comment:8 Changed 5 years ago by rjollos

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

See also #1749.

Add Comment

Modify Ticket

Action
as closed .
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from coderanger. Next status will be 'closed'.
The resolution will be deleted. Next status will be 'reopened'.
Author


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

 
Note: See TracTickets for help on using tickets.