Summary: | app-portage/gentoolkit-0.3.0.4: equery check - UnicodeDecodeError | ||
---|---|---|---|
Product: | Portage Development | Reporter: | Paul Varner (RETIRED) <fuzzyray> |
Component: | Tools | Assignee: | Portage Tools Team <tools-portage> |
Status: | CONFIRMED --- | ||
Severity: | normal | CC: | fturco, hu |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
Paul Varner (RETIRED)
![]() In portage, we use the portage._unicode_module_wrapper class to manually convert unicode arguments to bytes before they are passed to the os module. Passing raw bytes to the os module allows us to use it with file names that aren't necessarily encoded with the same encoding as sys.getfilesystemencoding(). I get a very similar error message: # equery check ca-certificates Traceback (most recent call last): File "/usr/bin/equery-python3.2", line 38, in <module> equery.main(sys.argv) File "/usr/lib64/python3.2/site-packages/gentoolkit/equery/__init__.py", line 357, in main loaded_module.main(module_args) File "/usr/lib64/python3.2/site-packages/gentoolkit/equery/check.py", line 288, in main check(matches) File "/usr/lib64/python3.2/site-packages/gentoolkit/equery/check.py", line 80, in __call__ check_results = self._run_checks(pkg.parsed_contents()) File "/usr/lib64/python3.2/site-packages/gentoolkit/equery/check.py", line 109, in _run_checks if not os.path.exists(real_cfile): File "/usr/lib64/python3.2/genericpath.py", line 18, in exists os.stat(path) UnicodeEncodeError: 'ascii' codec can't encode character '\u011f' in position 49: ordinal not in range(128) ----- I'm running app-portage/gentoolkit-0.3.0.8-r1. I can't replicate the problem on my system. (python-2.7 is default) big_daddy gentoolkit # equery check ca-certificates * Checking app-misc/ca-certificates-20130610 ... 497 out of 497 files passed big_daddy gentoolkit # equery-python3.2 check ca-certificates * Checking app-misc/ca-certificates-20130610 ... 497 out of 497 files passed big_daddy gentoolkit # Francesco, can you see if running "equery-python2.7 check ca-certificates" (provided gentoolkit is installed in 2.7 as well) also produces the same error? Also what is your locale setting? and installed portage version? "equery-python2.7 check ca-certificates" produces the same error message. portage version is 2.2.4. "locale" command returns POSIX... but # localectl | grep "System Locale" System Locale: LANG=en_US.utf8 I'm running systemd, perhaps is due to bug 465468. If I set the LANG variable correctly in /etc/env.d/02locale and I run env-update && source /etc/profile then equery works. I'm still not sure if this problem is due to a misconfiguration on my side or due to a bug in equery. It's a bug in equery that is only shows up when using a non UTF-8 locale. The workaround is to make sure that your locale settings are using UTF-8 when running equery. |