[New-bugs-announce] [issue14907] SSL module cannot handle unicode filenames

Marc Schlaich report at bugs.python.org
Fri May 25 08:49:10 CEST 2012

New submission from Marc Schlaich <marc.schlaich at googlemail.com>:

Here is a short example to reproduce the error:

>>> import socket, ssl
>>> sock = socket.socket()
>>> sock = ssl.wrap_socket(sock, cert_reqs=ssl.CERT_REQUIRED, ca_certs=u'ä.crt')
>>> sock.connect((None, None))
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Python27\lib\ssl.py", line 322, in connect
    self._real_connect(addr, False)
  File "C:\Python27\lib\ssl.py", line 305, in _real_connect
    self.ca_certs, self.ciphers)
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe4' in position 0:
ordinal not in range(128)

components: Library (Lib), Unicode
messages: 161554
nosy: ezio.melotti, ms4py
priority: normal
severity: normal
status: open
title: SSL module cannot handle unicode filenames
type: crash
versions: Python 2.6, Python 2.7

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list