postats.py broken with Python 3
Richard Kimberly Heck
rikiheck at lyx.org
Fri Sep 18 15:59:47 UTC 2020
The version of postats.py in master has been updated to work with
(indeed, require) Python 3. Is there any reason not to backport it?
Riki
On 9/18/20 11:32 AM, Richard Kimberly Heck wrote:
> ../lyx-stable/po/ [⚡ 2.3.x] > /usr/bin/python3 ./postats.py "2.3.5.2"
> ar.po bg.po cs.po de.po el.po en.po es.po eu.po fi.po fr.po he.po hu.po
> ia.po id.po it.po ja.po nb.po nl.po nn.po pl.po pt_BR.po pt_PT.po ru.po
> sk.po sv.po tr.po uk.po zh_CN.po zh_TW.po >i18n.inc
> Traceback (most recent call last):
> File "./postats.py", line 144, in <module>
> )?>""" % (sys.argv[1], branch_tag, ",".join([run_msgfmt(po) for po
> in sys.argv[2:] if po not in ommitted])))
> File "./postats.py", line 144, in <listcomp>
> )?>""" % (sys.argv[1], branch_tag, ",".join([run_msgfmt(po) for po
> in sys.argv[2:] if po not in ommitted])))
> File "./postats.py", line 103, in run_msgfmt
> header = read_pofile(pofile)
> File "./postats.py", line 72, in read_pofile
> for line in open(pofile):
> File "/usr/lib64/python3.7/encodings/ascii.py", line 26, in decode
> return codecs.ascii_decode(input, self.errors)[0]
> UnicodeDecodeError: 'ascii' codec can't decode byte 0xd8 in position
> 872: ordinal not in range(128)
>
> ../lyx-stable/po/ [⚡ 2.3.x] > /usr/bin/python2 ./postats.py "2.3.5.2"
> ar.po bg.po cs.po de.po el.po en.po es.po eu.po fi.po fr.po he.po hu.po
> ia.po id.po it.po ja.po nb.po nl.po nn.po pl.po pt_BR.po pt_PT.po ru.po
> sk.po sv.po tr.po uk.po zh_CN.po zh_TW.po >i18n.inc
>
> Success!
>
> Riki
>
>
More information about the lyx-devel
mailing list