j-andrews7/kenpompy

Login Failure -- "No cipher can be selected"

Closed this issue · 3 comments

Hello,
I'm getting the following error when running the login method with valid login credentials:

Traceback (most recent call last):
File "/Users/jblazzy/PycharmProjects/CBB23/main.py", line 14, in
main()
File "/Users/jblazzy/PycharmProjects/CBB23/main.py", line 8, in main
browser = login(os.environ['KP_EMAIL'], os.environ['KP_PWD'])
File "/Users/jblazzy/PycharmProjects/CBB23/venv/lib/python3.9/site-packages/kenpompy/utils.py", line 25, in login
session.mount('https://kenpom.com/', DESAdapter())
File "/Users/jblazzy/PycharmProjects/CBB23/venv/lib/python3.9/site-packages/requests/adapters.py", line 156, in init
self.init_poolmanager(pool_connections, pool_maxsize, block=pool_block)
File "/Users/jblazzy/PycharmProjects/CBB23/venv/lib/python3.9/site-packages/kenpompy/DESAdapter.py", line 19, in init_poolmanager
context = create_urllib3_context(ciphers=CIPHERS)
File "/Users/jblazzy/PycharmProjects/CBB23/venv/lib/python3.9/site-packages/urllib3/util/ssl
.py", line 292, in create_urllib3_context
context.set_ciphers(ciphers or DEFAULT_CIPHERS)
ssl.SSLError: ('No cipher can be selected.',)

I'm running this in a PyCharm virtual environment using python 3.9

Has anyone else run into this?

Thanks

How I'm calling this with environment variables:
`from kenpompy.utils import login
import os

def main():
browser = login(os.environ['KP_EMAIL'], os.environ['KP_PWD'])

if name == 'main':
main()`

Almost certainly related to #33 (and the fix for that). Updating to python 3.11 might help, but we need to look into this further.

Thanks for the pointer!
I commented out these two lines from utils, and it's working now.
if environment_requires_DES_adapter():
session.mount('https://kenpom.com/', DESAdapter())