0
0 Комментариев

wb = xlrd.open_workbook(os.path.join(‘/public_html/cgi-bin/files/’, ‘Актуальный склад.xls’), encoding_override=»cp1251″)

Traceback (most recent call last):
File «/public_html/cgi-bin/main.py», line 201, in <module>
wb = xlrd.open_workbook(os.path.join(‘/public_html/cgi-bin/files/’, ‘\u0410\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0439 \u0441\u043a\u043b\u0430\u0434.xls’), encoding_override=»cp1251″)
File «/.local/lib/python3.6/site-packages/xlrd/__init__.py», line 111, in open_workbook
with open(filename, «rb») as f:

UnicodeEncodeError: ‘ascii’ codec can’t encode characters in position 53-62: ordinal not in range(128)

Версия — python 3.6

locale:

LANG=ru_RU.UTF-8
LANGUAGE=
LC_CTYPE=»ru_RU.UTF-8″
LC_NUMERIC=»ru_RU.UTF-8″
LC_TIME=»ru_RU.UTF-8″
LC_COLLATE=»ru_RU.UTF-8″
LC_MONETARY=»ru_RU.UTF-8″
LC_MESSAGES=»ru_RU.UTF-8″
LC_PAPER=»ru_RU.UTF-8″
LC_NAME=»ru_RU.UTF-8″
LC_ADDRESS=»ru_RU.UTF-8″
LC_TELEPHONE=»ru_RU.UTF-8″
LC_MEASUREMENT=»ru_RU.UTF-8″
LC_IDENTIFICATION=»ru_RU.UTF-8″
LC_ALL=ru_RU.UTF-8

Как побороть кирилицу?


Добавить комментарий