* [devel] python & utf8
@ 2013-11-29 8:01 REAL
2013-11-29 8:35 ` Ivan A. Melnikov
0 siblings, 1 reply; 2+ messages in thread
From: REAL @ 2013-11-29 8:01 UTC (permalink / raw)
To: ALT Linux Team development discussions
Привет!
Что может помочь в такой ситуации?
Traceback (most recent call last):
File "/usr/bin/2to3", line 5, in <module>
sys.exit(main("lib2to3.fixes"))
File "/usr/lib64/python2.7/lib2to3/main.py", line 260, in main
options.processes)
File "/usr/lib64/python2.7/lib2to3/refactor.py", line 706, in refactor
items, write, doctests_only)
File "/usr/lib64/python2.7/lib2to3/refactor.py", line 301, in refactor
self.refactor_file(dir_or_file, write, doctests_only)
File "/usr/lib64/python2.7/lib2to3/refactor.py", line 747, in
refactor_file
*args, **kwargs)
File "/usr/lib64/python2.7/lib2to3/refactor.py", line 341, in
refactor_file
input, encoding = self._read_python_source(filename)
File "/usr/lib64/python2.7/lib2to3/refactor.py", line 337, in
_read_python_source
return _from_system_newlines(f.read()), encoding
File "/usr/lib64/python2.7/codecs.py", line 671, in read
return self.reader.read(size)
File "/usr/lib64/python2.7/codecs.py", line 477, in read
newchars, decodedbytes = self.decode(data, self.errors)
UnicodeDecodeError: 'utf8' codec can't decode byte 0xc8 in position
99: invalid continuation byte
--
REAL aka Евгений Ростовцев, программист ЦНИТ КемГУ
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [devel] python & utf8
2013-11-29 8:01 [devel] python & utf8 REAL
@ 2013-11-29 8:35 ` Ivan A. Melnikov
0 siblings, 0 replies; 2+ messages in thread
From: Ivan A. Melnikov @ 2013-11-29 8:35 UTC (permalink / raw)
To: ALT Linux Team development discussions
On 29.11.2013 12:01, REAL wrote:
> Привет!
>
> Что может помочь в такой ситуации?
>
> Traceback (most recent call last):
> File "/usr/bin/2to3", line 5, in <module>
> sys.exit(main("lib2to3.fixes"))
> File "/usr/lib64/python2.7/lib2to3/main.py", line 260, in main
> options.processes)
> File "/usr/lib64/python2.7/lib2to3/refactor.py", line 706, in refactor
> items, write, doctests_only)
> File "/usr/lib64/python2.7/lib2to3/refactor.py", line 301, in refactor
> self.refactor_file(dir_or_file, write, doctests_only)
> File "/usr/lib64/python2.7/lib2to3/refactor.py", line 747, in
> refactor_file
> *args, **kwargs)
> File "/usr/lib64/python2.7/lib2to3/refactor.py", line 341, in
> refactor_file
> input, encoding = self._read_python_source(filename)
> File "/usr/lib64/python2.7/lib2to3/refactor.py", line 337, in
> _read_python_source
> return _from_system_newlines(f.read()), encoding
> File "/usr/lib64/python2.7/codecs.py", line 671, in read
> return self.reader.read(size)
> File "/usr/lib64/python2.7/codecs.py", line 477, in read
> newchars, decodedbytes = self.decode(data, self.errors)
> UnicodeDecodeError: 'utf8' codec can't decode byte 0xc8 in position 99:
> invalid continuation byte
>
Скорее всего это означает, что файл, который 2to3 пытается открыть как
UTF8, UTF8 не является. Нужно посмотреть, что это за файл, и либо
исправить его приведя к валидному UTF8, либо как-то объяснить 2to3 что
это файл в другой кодировке (например, latin-1). Подробнее по этому
стектрейсу сказать трудно.
--
WBR,
Ivan A. Melnikov
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-11-29 8:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-29 8:01 [devel] python & utf8 REAL
2013-11-29 8:35 ` Ivan A. Melnikov
ALT Linux Team development discussions
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://lore.altlinux.org/devel/0 devel/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 devel devel/ http://lore.altlinux.org/devel \
devel@altlinux.org devel@altlinux.ru devel@lists.altlinux.org devel@lists.altlinux.ru devel@linux.iplabs.ru mandrake-russian@linuxteam.iplabs.ru sisyphus@linuxteam.iplabs.ru
public-inbox-index devel
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://lore.altlinux.org/org.altlinux.lists.devel
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git