Opened 13 years ago
Closed 9 years ago
#10597 closed defect (fixed)
GitPlugin: UnicodeDecodeError
Reported by: | Peter Suter | Owned by: | Jun Omae |
---|---|---|---|
Priority: | lowest | Milestone: | 1.0.7 |
Component: | plugin/git | Version: | |
Severity: | normal | Keywords: | unicode windows |
Cc: | Branch: | ||
Release Notes: |
Fix |
||
API Changes: | |||
Internal Changes: |
Description
Created as part of the move of GitPlugin. Tickets originally reported for th:GitPlugin: th:#8087, th:#8944
Quoting Charger:
After commit in GIT repositiories file with cyrillic characters in filename and
cached_repository = true
, Trac fails sync. Whencached_repository = false
trac show error only on page, when he must show cyrillic filename.
This might be a configuration issue of git_fs_encoding
.
Attachments (0)
Change History (5)
comment:1 by , 12 years ago
Keywords: | unicode added |
---|---|
Milestone: | → next-stable-1.0.x |
Priority: | normal → lowest |
comment:3 by , 10 years ago
Keywords: | windows added |
---|
comment:4 by , 10 years ago
Milestone: | next-stable-1.0.x → 1.0.7 |
---|---|
Owner: | set to |
Status: | new → assigned |
On Windows, viewing a file with unicode path using repository browser leads a UnicodeDecodeError
.
2015-06-04 02:11:27,171 Trac[main] ERROR: Internal Server Error: Traceback (most recent call last): File "C:\usr\src\trac\trac.git\trac\web\main.py", line 534, in _dispatch_request dispatcher.dispatch(req) File "C:\usr\src\trac\trac.git\trac\web\main.py", line 227, in dispatch resp = chosen_handler.process_request(req) File "C:\usr\src\trac\trac.git\trac\versioncontrol\web_ui\browser.py", line 376, in process_request node = get_existing_node(req, repos, path, rev_or_latest) File "C:\usr\src\trac\trac.git\trac\versioncontrol\web_ui\util.py", line 74, in get_existing_node return repos.get_node(path, rev) File "C:\usr\src\trac\trac.git\tracopt\versioncontrol\git\git_fs.py", line 542, in get_node return GitNode(self, path, rev, self.log, None, historian) File "C:\usr\src\trac\trac.git\tracopt\versioncontrol\git\git_fs.py", line 655, in __init__ ls_tree_info = repos.git.ls_tree(rev, p) or None File "C:\usr\src\trac\trac.git\tracopt\versioncontrol\git\PyGIT.py", line 770, in ls_tree tree = self.repo.ls_tree('-z', '-l', rev, '--', path).split('\0') File "C:\usr\src\trac\trac.git\tracopt\versioncontrol\git\PyGIT.py", line 121, in __execute p = self.__pipe(git_cmd, stdout=PIPE, stderr=PIPE, *cmd_args) File "C:\usr\src\trac\trac.git\tracopt\versioncontrol\git\PyGIT.py", line 114, in __pipe close_fds=close_fds, **kw) File "C:\usr\apps\python27\lib\subprocess.py", line 710, in __init__ errread, errwrite) File "C:\usr\apps\python27\lib\subprocess.py", line 913, in _execute_child args = list2cmdline(args) File "C:\usr\apps\python27\lib\subprocess.py", line 644, in list2cmdline return ''.join(result) UnicodeDecodeError: 'ascii' codec can't decode byte 0xe3 in position 0: ordinal not in range(128)
Because Popen()
accepts only ANSI encoding on Windows. We should encode arguments of Popen()
with mbcs
encoding.
Proposed changes in [6803b460d/jomae.git] (jomae.git@t10597).
comment:5 by , 9 years ago
Release Notes: | modified (diff) |
---|---|
Resolution: | → fixed |
Status: | assigned → closed |
Link to a git repos demonstrating the issue welcome.