Modify

Opened 9 years ago

Closed 5 years ago

#2253 closed defect (wontfix)

Error with wiki page names including non-ascii characters

Reported by: Jun Omae Owned by: Noah Kantrowitz
Priority: normal Component: WikiRenamePlugin
Severity: normal Keywords:
Cc: Trac Release: 0.10

Description

Get following error message when renaming from wiki page names including non-ascii characters.

2007-11-29 11:17:43,005 Trac[main] ERROR: [Errno 2] No such file or directory
Traceback (most recent call last):
  File "/usr/lib/python2.3/site-packages/trac/web/main.py", line 406, in dispatch_request
    dispatcher.dispatch(req)
  File "/usr/lib/python2.3/site-packages/trac/web/main.py", line 237, in dispatch
    resp = chosen_handler.process_request(req)
  File "/usr/lib/python2.3/site-packages/TracWebAdmin-0.1.2dev_r4240-py2.3.egg/webadmin/web_ui.py", line 109, in process_request
    path_info)
  File "/usr/lib/python2.3/site-packages/TracWikiRename-1.2-py2.3.egg/wikirename/web_ui.py", line 54, in process_admin_request
    rename_page(self.env, src, dest, req.authname, req.remote_addr, debug=self.log.debug)
  File "/usr/lib/python2.3/site-packages/TracWikiRename-1.2-py2.3.egg/wikirename/util.py", line 74, in rename_page
    os.renames(from_path, to_path)
  File "/usr/lib/python2.3/os.py", line 196, in renames
    rename(old, new)
OSError: [Errno 2] No such file or directory

Should use unicode_quote instead of urllib.quote, see unicode.diff.

Attachments (1)

unicode.diff (970 bytes) - added by Jun Omae 9 years ago.

Download all attachments as: .zip

Change History (5)

Changed 9 years ago by Jun Omae

Attachment: unicode.diff added

comment:1 Changed 8 years ago by Hiroki Najima

Your patch works well on trac 0.11.2 and WikiRenamePlugin[3688]. Thank you jun66j5.

I faced another problem "KeyError exception", but it was fixed after I applied this patch.

Please consider to apply this patch to trunk.

comment:2 Changed 6 years ago by anonymous

I've hit the same issue and my trac 0.12 now starting to work well with this patch. Thanks jun66j5!! I strongly recommend to have this patch in the main trunk.

One note, seems like this problem occurs when we try to rename the page that; 1) wiki name contains non-ascii chars (represented as unicode), AND 2) the page contains attachment

comment:3 in reply to:  2 Changed 6 years ago by Jun Omae

Replying to anonymous:

I've hit the same issue and my trac 0.12 now starting to work well with this patch. Thanks jun66j5!! I strongly recommend to have this patch in the main trunk.

Hi,

"Renaming wiki page" feature is built-in for Trac 0.12. If you use Trac 0.12, you maybe don't need WikiRenamePlugin.

cf. http://trac.edgewall.org/ticket/1106

comment:4 Changed 5 years ago by Ryan J Ollos

Resolution: wontfix
Status: newclosed

0.10 version of the plugin is deprecated.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Noah Kantrowitz.
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.