Opened 10 years ago

Closed 10 years ago

#3893 closed defect (worksforme)

Merge for wiki pages with not ansi titles doesn't work

Reported by: Sergey Panfilov Owned by: chmullig
Priority: normal Component: TracMergeScript
Severity: minor Keywords:
Cc: Trac Release: 0.10


I have the page named like:

(Pdb) p oldPageName

When tracmerge is exporting it, I get the following error.

Page web:WikiStart is now merged:OldStarts/web
Traceback (most recent call last):
  File "", line 91, in <module>
  File "", line 88, in main
  File "/home/panfilov/tracmergescript/", line 106, in merge
  File "/home/panfilov/tracmergescript/", line 151, in mergeWiki
    print u"Page %s:%s is now %s:%s" % (sTrac['name'], oldPageName, pageDest, pageData[-1]['name'])
UnicodeEncodeError: 'ascii' codec can't encode characters in position 9-18: ordinal not in range(128)

Please note, I've modified output format string in hope, that it will work. However it didn't work and python still is using ascii codec for conversion.

Attachments (0)

Change History (2)

comment:1 Changed 10 years ago by Sergey Panfilov

Well, it seems my changes were not needed, so I turned to original version and set up the default encoding to koi8-r. However it didn't help, because all string arguments in all printouts need explicit encoding conversions. Implicit conversion for unknown for me reason is done to ansi.

comment:2 Changed 10 years ago by Sergey Panfilov

Resolution: worksforme
Severity: blockerminor
Status: newclosed

Workaround exists, so I'm lowering the severity. It's possible to run without modifications, but sys.stdout.encoding has to be set to the locale encoding, e.g. using LANG.

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain chmullig.
The resolution will be deleted.

Add Comment

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

Note: See TracTickets for help on using tickets.