my trac 0.96 env is set to UTF-8, and somehow another svn client added a
commit message that's latin-1 or something. The post commit handler
added the message to the corresponding ticket, and when I try to view
the ticket I get this error:
...
OperationalError: Could not decode to UTF-8 column <unknown column name>
with text (... some text here...)

You can try to fix the DB directly from the sqlite tool. If you know a
bit about SQL, it should be easy. You need to run the following
command as the web server user or as root.

* IMPORTANT: backup your DB file
 cd /project_path/db; cp trac.db trac-backup.db
* open the DB file with
 sqlite3 trac.db
* find the entry that match the ticket that is in trouble with
something like this:
 select * from ticket_change where ticket='666' and field='comment';
(replace 666 with the actual ticket id)
* check which comment is the one in trouble and note its position
(stored as 'oldvalue')
* replace the comment with something like
 update ticket_change set comment='...' where ticket='666' and
field='comment' and oldvalue='0';
(again replace 666 with the actual ticket id, 0 with the actual
position you found in the previous step, and ... with the new, fixed
comment - be careful to escape the quote chars if the new message
contains some)
* verify that the ticket comment has been changed as you wish, using
the SQL select command
* quit sqlite
 .quit

HTH,
Manu
_______________________________________________
Trac mailing list
[email protected]
http://lists.edgewall.com/mailman/listinfo/trac

Reply via email to