mahendrakalkura / www.bet365.com

44 stars 16 forks source link

KeyError: "name=u'pstk', domain=None, path=None" #2

Closed NikosVlagoidis closed 6 years ago

NikosVlagoidis commented 6 years ago

Getting the following exception:

opening connection...
opened connection
fetching session id...
closed connection
(u'code:', 1006)
(u'reason:', 'Going away')
Exception in thread WebSocketClient:
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.7/threading.py", line 754, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/home/nikos/.virtualenvs/untitled/local/lib/python2.7/site-packages/ws4py/websocket.py", line 522, in run
    self.opened()
  File "/home/nikos/Desktop/Side Projects/www.bet365.com/manage.py", line 68, in opened
    session_id = self._fetch_session_id()
  File "/home/nikos/Desktop/Side Projects/www.bet365.com/manage.py", line 115, in _fetch_session_id
    session_id = response.cookies[u'pstk']
  File "/home/nikos/.virtualenvs/untitled/local/lib/python2.7/site-packages/requests/cookies.py", line 327, in __getitem__
    return self._find_no_duplicates(name)
  File "/home/nikos/.virtualenvs/untitled/local/lib/python2.7/site-packages/requests/cookies.py", line 398, in _find_no_duplicates
    raise KeyError('name=%r, domain=%r, path=%r' % (name, domain, path))
KeyError: "name=u'pstk', domain=None, path=None"
xtonousou commented 6 years ago

@NikosVlagoidis try to use a proxy, this is happening because bet365.com is blocked in Greece.

NikosVlagoidis commented 6 years ago

Just what I thought! Thanks for the info!