got an unexpected keyword argument 'ssl_context'

See original GitHub issue

Please note that: ssl_context = pythonssllib.create_default_context() is new in python version 2.7.9.

after installing 2.7.11, i get this error:

>>> imbox = Imbox('imap.gmail.com', username='...@gmail.com', password='...')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/naruto/Programming/imap_test/venv/lib/python2.7/site-packages/imbox/__init__.py", line 15, in __init__
    ssl_context=None)
  File "/home/naruto/Programming/imap_test/venv/lib/python2.7/site-packages/imbox/imap.py", line 28, in __init__
    self.server = self.transport(self.hostname, self.port, **kwargs)
TypeError: __init__() got an unexpected keyword argument 'ssl_context'

looks like ssl_context argument is not supported in 2.7

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:10 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
sebixcommented, Aug 8, 2016

Python 2.7 does not allow specifying ssl_context, thus no certificates can be validated. I want to encourage you to not disable this and use Python 3 only. I consider Python 2.7 a security risk.

Read more comments on GitHub >

github_iconTop Results From Across the Web

SSLConnection `__init__() got an unexpected keyword ...
2 I am running into an __init__() got an unexpected keyword argument 'ssl' . (with rq version ==1.5.1 the error does not appear)....
Read more >
python - wrap_socket() got an unexpected keyword argument ...
Essentially, it creates an OpenSSL.SSL.Connection from an existing socket, but since that connection isn't compatible with a socket, it wraps it ...
Read more >
self-signed ssl: wrap_socket: __init__() got an unexpected ...
TypeError: __init__() got an unexpected keyword argument 'server_hostname'. I read here that this error is due to an ssl depreciation in python2.7, ...
Read more >
1384491 – TypeError: __init__() got an unexpected ...
Description of problem: When running our 22 LC on RHEL7.2 (updated) that connects to our beaker server over SSL, following error appears when...
Read more >
I'm facing SSL (?) problems when I GET files to my local file ...
TypeError: getresponse() got an unexpected keyword argument 'buffering'. During handling of the above exception, another exception occurred:.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found