Modify

Opened 7 years ago

Closed 3 years ago

#2253 closed defect (wontfix)

Error with wiki page names including non-ascii characters

Reported by: jun66j5 Owned by: coderanger
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 jun66j5 7 years ago.

Download all attachments as: .zip

Change History (5)

Changed 7 years ago by jun66j5

comment:1 Changed 6 years ago by nazy

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 follow-up: Changed 3 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 3 years ago by jun66j5

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 3 years ago by rjollos

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

0.10 version of the plugin is deprecated.

Add Comment

Modify Ticket

Action
as closed The owner will remain coderanger.
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.