Bug #20113
Erreur lorsqu'on tente de logguer une erreur de récupération de métadonnées
Start date:
16 November 2017
Due date:
% Done:
0%
Estimated time:
Patch proposed:
Yes
Planning:
Description
Traceback: File "/usr/lib/python2.7/dist-packages/django/core/handlers/base.py" in get_response 125. response = middleware_method(request, callback, callback_args, callback_kwargs) File "/usr/lib/python2.7/dist-packages/mellon/middleware.py" in process_view 26. if not any(utils.get_idps()): File "/usr/lib/python2.7/dist-packages/mellon/utils.py" in get_idps 111. for idp in adapter.get_idps(): File "/usr/lib/python2.7/dist-packages/mellon/adapters.py" in get_idps 44. idp['METADATA_URL'], e, i) File "/usr/lib/python2.7/logging/__init__.py" in error 1186. self._log(ERROR, msg, args, **kwargs) File "/usr/lib/python2.7/logging/__init__.py" in _log 1279. self.handle(record) File "/usr/lib/python2.7/logging/__init__.py" in handle 1289. self.callHandlers(record) File "/usr/lib/python2.7/logging/__init__.py" in callHandlers 1329. hdlr.handle(record) File "/usr/lib/python2.7/logging/__init__.py" in handle 757. self.emit(record) File "/usr/lib/python2.7/dist-packages/django/utils/log.py" in emit 115. record.getMessage() File "/usr/lib/python2.7/logging/__init__.py" in getMessage 335. msg = msg % self.args Exception Type: TypeError at / Exception Value: __str__ returned non-string (type Error)
... e SSLError(SSLError(SSLError('bad handshake', Error([('SSL routines', 'SSL3_GET_SERVER_CERTIFICATE', 'certificate verify failed')],)),),)
Files
History
Updated by Benjamin Dauvergne over 5 years ago
C'est quelle version de requests sur quoi comme Debian ? Je ne reproduis pas chez moi.
Updated by Benjamin Dauvergne about 5 years ago
- Assignee set to Benjamin Dauvergne
- Patch proposed changed from No to Yes
Updated by Benjamin Dauvergne about 5 years ago
Ça ne sert à rien sur une jessie :
In [1]: try: requests.get('https://self-signed.badssl.com/') ...: except Exception as e: ...: pass ...: In [2]: print str(e) name 'requests' is not defined In [3]: import requests In [4]: try: requests.get('https://self-signed.badssl.com/') except Exception as e: pass ...: In [5]: print str(e) ("bad handshake: Error([('SSL routines', 'SSL3_GET_SERVER_CERTIFICATE', 'certificate verify failed')],)",) In [6]: print '%s' % e ("bad handshake: Error([('SSL routines', 'SSL3_GET_SERVER_CERTIFICATE', 'certificate verify failed')],)",) In [7]: print u'%s' % e ("bad handshake: Error([('SSL routines', 'SSL3_GET_SERVER_CERTIFICATE', 'certificate verify failed')],)",) In [8]: print requests.__version__ 2.11.1
et sur ma sid:
In [4]: try: requests.get('https://self-signed.badssl.com/') ...: except Exception as e: ...: pass ...: In [5]: print e HTTPSConnectionPool(host='self-signed.badssl.com', port=443): Max retries exceeded with url: / (Caused by SSLError(SSLError("bad handshake: Error([('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')],)",),)) In [6]: print str(e) HTTPSConnectionPool(host='self-signed.badssl.com', port=443): Max retries exceeded with url: / (Caused by SSLError(SSLError("bad handshake: Error([('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')],)",),)) In [7]: print '%s' % e HTTPSConnectionPool(host='self-signed.badssl.com', port=443): Max retries exceeded with url: / (Caused by SSLError(SSLError("bad handshake: Error([('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')],)",),)) In [8]: print u'%s' % e HTTPSConnectionPool(host='self-signed.badssl.com', port=443): Max retries exceeded with url: / (Caused by SSLError(SSLError("bad handshake: Error([('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')],)",),)) In [9]: requests.__version__ Out[9]: '2.18.4' </pr>
Updated by Benjamin Dauvergne about 4 years ago
- Status changed from Nouveau to Rejeté
Bon vraiment c'est impossible à reproduire de nos jours, c'est vraiment lié à des versions pourris (sous-class d'exception dont __str__()
renvoie autre chose qu'une string).