Opened 15 years ago
Last modified 15 months ago
#8829 new defect
[Patch] Make Trac work on all platforms with environment paths containing non-ASCII characters
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | low | Milestone: | next-stable-1.6.x |
Component: | admin/console | Version: | 0.12dev |
Severity: | major | Keywords: | environment path unicode patch |
Cc: | Thijs Triemstra | Branch: | |
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
(This is my very first ticket here, I have scanned for duplicates, to the best of my knowledge, but found none.)
My account name is "Administratör" in WinXP, and the following happens when using trac-admin to upgrade wiki in my environment:
trac-admin abc wiki upgrade CamelCase already up to date. InterMapTxt already exists. InterTrac already up to date. InterWiki already up to date. PageTemplates already up to date. RecentChanges already up to date. UnicodeDecodeError: ('ascii', 'C:\\Documents and Settings\\Administrat\xf6r\\App lication Data\\Python-Eggs\\trac-0.12dev_r8812-py2.6.egg-tmp\\trac\\wiki\\defaul t-pages\\SandBox', 37, 38, 'ordinal not in range(128)')
trac-admin seems to be choking on the ö
letter.
Attachments (1)
Change History (20)
comment:1 by , 15 years ago
Keywords: | environment path unicode added |
---|---|
Milestone: | → 1.0 |
Priority: | normal → low |
comment:3 by , 14 years ago
Cc: | added |
---|
Not sure why this was lowered in priority, since it breaks trac upgrades..?
follow-up: 5 comment:4 by , 14 years ago
Because there's an easy workaround: don't put your Trac environment in a path containing non-ASCII characters.
comment:5 by , 14 years ago
Replying to rblank:
Because there's an easy workaround: don't put your Trac environment in a path containing non-ASCII characters.
Is this documented?
comment:6 by , 14 years ago
Yes, under TracEnvironment#SomeUsefulTips. One could also add a word about this below TracInstall#CreatingaProjectEnvironment.
follow-up: 8 comment:7 by , 14 years ago
I added a word about it below TracInstall@323#CreatingaProjectEnvironment.
comment:8 by , 14 years ago
Severity: | normal → major |
---|
Replying to mrelbe:
I added a word about it below TracInstall@323#CreatingaProjectEnvironment.
Thanks. I guess raising it's severity is appropriate as well.
follow-up: 12 comment:9 by , 14 years ago
Cc: | added; removed |
---|
comment:10 by , 14 years ago
Summary: | trac-admin wiki upgrade fails when user account contains unicode chars → trac-admin wiki upgrade fails when environment name contains unicode chars |
---|
comment:11 by , 14 years ago
Summary: | trac-admin wiki upgrade fails when environment name contains unicode chars → trac-admin wiki upgrade fails when environment path contains unicode chars |
---|
comment:12 by , 14 years ago
Keywords: | patch added |
---|---|
Milestone: | unscheduled → 0.13 |
Summary: | trac-admin wiki upgrade fails when environment path contains unicode chars → [PATCH] trac-admin wiki upgrade fails when environment path contains unicode chars |
Replying to thijstriemstra:
Looks like there's actually a warning issued already:
try: unicode(env_path, 'ascii') except UnicodeDecodeError: printerr(_("Non-ascii environment path '%(path)s' not " "supported.", path=env_path)) sys.exit(2)
But this error fails to print, and throws:
$ trac-admin test-trac-Administratör upgrade wiki Traceback (most recent call last): File "/usr/local/bin/trac-admin", line 9, in <module> load_entry_point('Trac==0.13dev-r10664', 'console_scripts', 'trac-admin')() File "/home/thijs/workspaces/opensource/trac-trunk/trac/admin/console.py", line 546, in run "supported.", path=env_path)) File "/home/thijs/workspaces/opensource/trac-trunk/trac/util/translation.py", line 197, in gettext return _gettext() File "/home/thijs/workspaces/opensource/trac-trunk/trac/util/translation.py", line 194, in _gettext return safefmt(self.active.ugettext(string), kwargs) File "/home/thijs/workspaces/opensource/trac-trunk/trac/util/translation.py", line 33, in safefmt return string % kwargs UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 55: ordinal not in range(128)
Attached patch fixes that for me so the user at least knows what went wrong:
$ trac-admin test-trac-Administratör upgrade wiki Non-ascii environment path '/home/thijs/workspaces/opensource/test-trac-Administratör' not supported.
follow-up: 14 comment:13 by , 14 years ago
unicode-path-8829.patch applied on 0.12-stable in [10683], thanks. I'm leaving this open for fixing the original issue.
comment:14 by , 14 years ago
Summary: | [PATCH] trac-admin wiki upgrade fails when environment path contains unicode chars → Make Trac work on all platforms with environment paths containing non-ascii characters |
---|
Replying to rblank:
I'm leaving this open for fixing the original issue.
I'm renaming the ticket in that case.
comment:16 by , 9 years ago
Summary: | Make Trac work on all platforms with environment paths containing non-ascii characters → [Patch] Make Trac work on all platforms with environment paths containing non-ASCII characters |
---|
comment:17 by , 8 years ago
Milestone: | next-stable-1.0.x → next-stable-1.2.x |
---|
Moved ticket assigned to next-stable-1.0.x since maintenance of 1.0.x is coming to a close. Please move the ticket back if it's critical to fix on 1.0.x.
comment:18 by , 5 years ago
Milestone: | next-stable-1.2.x → next-stable-1.4.x |
---|
You're right, I also think there's no ticket about this.
Making Trac work on all platforms with environment paths containing non-ascii characters is something non-trivial.