Modify ↓
Opened 20 years ago
Closed 20 years ago
#3018 closed defect (fixed)
trac-admin hotcopy broken, unicode related problem
| Reported by: | Owned by: | Christian Boos | |
|---|---|---|---|
| Priority: | normal | Milestone: | 0.10 |
| Component: | admin/console | Version: | devel |
| Severity: | major | Keywords: | trac-admin unicode hotcopy |
| Cc: | sam@… | Branch: | |
| Release Notes: | |||
| API Changes: | |||
| Internal Changes: | |||
Description
Running trac-admin hotcopy fails with the following error :
Command failed: unicode() argument 2 must be string, not None
Trac trunk/, fresh update.
Attachments (0)
Change History (7)
comment:1 by , 20 years ago
| Milestone: | → 0.10 |
|---|---|
| Owner: | changed from to |
| Priority: | low → normal |
comment:3 by , 20 years ago
Well, can you also try to create a new Milestone using trac-admin, "avé les assents" :)
I suspect there could be a problem there if sys.stdin.encoding is not known.
It could then be worth to print a warning.
(+ what's your python version/platform?)
comment:4 by , 20 years ago
Creating a milestone with an accent worked without warnings (in interactive mode).
Python 2.3.5 (#2, Mar 6 2006, 10:12:24) [GCC 4.0.3 20060304 (prerelease) (Debian 4.0.2-10)] on linux2 Linux frog 2.6.11-grsec #3 Sun Mar 6 20:05:04 CET 2005 i686 GNU/Linux
comment:7 by , 20 years ago
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
Note:
See TracTickets
for help on using tickets.



Probably
sys.stdin.encodingwhich isNonefor you.Can you try this patch?
Index: admin.py =================================================================== --- admin.py (revision 3118) +++ admin.py (working copy) @@ -90,7 +90,7 @@ """`line` may be a `str` or an `unicode` object""" try: if isinstance(line, str): - line = unicode(line, sys.stdin.encoding) + line = util.to_unicode(line, sys.stdin.encoding) rv = cmd.Cmd.onecmd(self, line) or 0 except SystemExit: raise