harwee/IQOption-Api

get KeyError

Closed this issue · 1 comments

when i try to run: (changed with my email and password)

from iqoption_api import IQOption
iqoption = IQOption("mail@email.com", "password")
iqoption.start()

i got this error:

Exception in thread Thread-1:
Traceback (most recent call last):
  File "C:\Users\aldho\AppData\Local\Programs\Python\Python36-32\lib\threading.py", line 916, in _bootstrap_inner
    self.run()
  File "C:\Users\aldho\AppData\Local\Programs\Python\Python36-32\lib\threading.py", line 864, in run
    self._target(*self._args, **self._kwargs)
  File "C:\Users\aldho\Desktop\IQOption-Api-async\iqoption_api\api.py", line 108, in start_async_loop_thread
    self._async_loop.run_until_complete(asyncio.gather(*asyncio.Task.all_tasks(loop=self._async_loop)))
  File "C:\Users\aldho\AppData\Local\Programs\Python\Python36-32\lib\asyncio\base_events.py", line 468, in run_until_complete
    return future.result()
  File "C:\Users\aldho\Desktop\IQOption-Api-async\iqoption_api\api.py", line 128, in async_run
    login_response = await self.login()
  File "C:\Users\aldho\Desktop\IQOption-Api-async\iqoption_api\api.py", line 171, in login
    self.__ssid = login_response.cookies["ssid"]
  File "C:\Users\aldho\AppData\Local\Programs\Python\Python36-32\lib\site-packages\requests\cookies.py", line 328, in __getitem__
    return self._find_no_duplicates(name)
  File "C:\Users\aldho\AppData\Local\Programs\Python\Python36-32\lib\site-packages\requests\cookies.py", line 399, in _find_no_duplicates
    raise KeyError('name=%r, domain=%r, path=%r' % (name, domain, path))
KeyError: "name='ssid', domain=None, path=None"

is your code still working?

issue resolved,
change LOGIN_URL in api.py line 10:

https://auth.iqoption.com/api/v1.0/login

thanks