DarkCat09/python-aternos

TypeError: init() got an unexpected keyword argument 'ssl_context'

ElMishucha opened this issue · 2 comments

from python_aternos import Client

at = Client.from_credentials("my_correct_username", "my_correct_password")

And when i run my program it takes error:

Traceback (most recent call last):
  File "C:\Me\Python\TopServ\main.py", line 4, in <module>
    at = Client.from_credentials("ElMishucha", "e1212kVTTPA4fEEg")
  File "C:\Users\El Mishucha\AppData\Local\Programs\Python\Python39\lib\site-packages\python_aternos\atclient.py", line 149, in from_credentials
    return cls.from_hashed(
  File "C:\Users\El Mishucha\AppData\Local\Programs\Python\Python39\lib\site-packages\python_aternos\atclient.py", line 93, in from_hashed
    atconn.parse_token()
  File "C:\Users\El Mishucha\AppData\Local\Programs\Python\Python39\lib\site-packages\python_aternos\atconnect.py", line 91, in parse_token
    loginpage = self.request_cloudflare(
  File "C:\Users\El Mishucha\AppData\Local\Programs\Python\Python39\lib\site-packages\python_aternos\atconnect.py", line 235, in request_cloudflare
    req = sendreq(
  File "C:\Users\El Mishucha\AppData\Local\Programs\Python\Python39\lib\site-packages\requests\sessions.py", line 476, in get
    return self.request('GET', url, **kwargs)
  File "C:\Users\El Mishucha\AppData\Local\Programs\Python\Python39\lib\site-packages\cloudscraper\__init__.py", line 257, 
in request
    self.perform_request(method, url, *args, **kwargs)
  File "C:\Users\El Mishucha\AppData\Local\Programs\Python\Python39\lib\site-packages\cloudscraper\__init__.py", line 190, 
in perform_request
    return super(CloudScraper, self).request(method, url, *args, **kwargs)
  File "C:\Users\El Mishucha\AppData\Local\Programs\Python\Python39\lib\site-packages\requests\sessions.py", line 464, in request
    resp = self.send(prep, **send_kwargs)
  File "C:\Users\El Mishucha\AppData\Local\Programs\Python\Python39\lib\site-packages\requests\sessions.py", line 576, in send
    r = adapter.send(request, **kwargs)
  File "C:\Users\El Mishucha\AppData\Local\Programs\Python\Python39\lib\site-packages\requests\adapters.py", line 360, in send
    resp = conn.urlopen(
  File "C:\Users\El Mishucha\AppData\Local\Programs\Python\Python39\lib\site-packages\requests\packages\urllib3\connectionpool.py", line 533, in urlopen
    conn = self._get_conn(timeout=pool_timeout)
  File "C:\Users\El Mishucha\AppData\Local\Programs\Python\Python39\lib\site-packages\requests\packages\urllib3\connectionpool.py", line 246, in _get_conn
    return conn or self._new_conn()
  File "C:\Users\El Mishucha\AppData\Local\Programs\Python\Python39\lib\site-packages\requests\packages\urllib3\connectionpool.py", line 748, in _new_conn
    conn = self.ConnectionCls(host=actual_host, port=actual_port,
  File "C:\Users\El Mishucha\AppData\Local\Programs\Python\Python39\lib\site-packages\requests\packages\urllib3\connection.py", line 165, in __init__
    HTTPConnection.__init__(self, host, port, strict=strict,
  File "C:\Users\El Mishucha\AppData\Local\Programs\Python\Python39\lib\site-packages\requests\packages\urllib3\connection.py", line 118, in __init__
    _HTTPConnection.__init__(self, *args, **kw)
TypeError: __init__() got an unexpected keyword argument 'ssl_context'

Could you send more information? I need:

  • Windows version (run command winver)
  • Python version (run python)
  • Version of python-aternos, cloudscraper, requests (run pip list | findstr "module_name")

@ElMishucha,

I can't fix it before you send me the information I requested above, because the error is reproducable only on your system.
Please, click "Reopen" button if you still get this error, and then provide info about your OS and Python.