[issue33354] Python2: test_ssl fails on non-ASCII path

STINNER Victor report at bugs.python.org
Wed Apr 25 10:16:26 EDT 2018


STINNER Victor <vstinner at redhat.com> added the comment:

The issue is not specific to FreeBSD, it depends on the locale (on the Python filesystem encoding).

I reproduced the issue on Linux:

vstinner at apu$ LC_ALL=C ./python -m test test_ssl
Run tests sequentially
0:00:00 load avg: 0.27 [1/1] test_ssl
test test_ssl failed -- Traceback (most recent call last):
  File "/home/vstinner/prog/python/2.7/Lib/test/test_ssl.py", line 1005, in test_load_dh_params
    shutil.copy(DHFILE, fname)
  File "/home/vstinner/prog/python/2.7/Lib/shutil.py", line 131, in copy
    if os.path.isdir(dst):
  File "/home/vstinner/prog/python/2.7/Lib/genericpath.py", line 49, in isdir
    st = os.stat(s)
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe4' in position 18: ordinal not in range(128)

1 test failed:
    test_ssl

Total duration: 1 sec
Tests result: FAILURE

----------
components:  -FreeBSD
nosy:  -koobs
title: Python2, FreeBSD: test_ssl fails on non-ASCII path -> Python2: test_ssl fails on non-ASCII path

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue33354>
_______________________________________


More information about the Python-bugs-list mailing list