fbchat
fbchat copied to clipboard
Error while login
Description of the problem
login fails , i am using fresh install using pip.
Code to reproduce
#Settings:
mail="<mail>"
pwd="<pwd>"
from fbchat import Client
from fbchat.models import *
import pickle
import logging
logging.basicConfig(filename='logFF.log', level=logging.DEBUG)
logging.info('Authenticating..')
client = Client(mail, pwd)
#client = Bot(mail, pwd, session_cookies=session_cookies)
logging.info('Retrieving session cookies')
'''session_cookies = client.getSession()
with open('session.pickle','wb') as f:
pickle.dump(session_cookies,f)'''
#client.setSession(session_cookies)
#client.listen()
print(client.uid)
client.logout()
Traceback
Logging in <mail>
Attempt #1 failed, retrying
Traceback (most recent call last):
File "C:\Users\princ\AppData\Local\Programs\Python\Python37\lib\site-packages\fbchat\_client.py", line 209, in login
user_agent=user_agent,
File "C:\Users\princ\AppData\Local\Programs\Python\Python37\lib\site-packages\fbchat\_state.py", line 151, in login
return cls.from_session(session=session)
File "C:\Users\princ\AppData\Local\Programs\Python\Python37\lib\site-packages\fbchat\_state.py", line 190, in from_session
revision = int(r.text.split('"client_revision":', 1)[1].split(",", 1)[0])
IndexError: list index out of range
Environment information
- Python 3.7
- fbchat 1.9.7
- windows 10
I couldn't find useful info about my problem.
This just started happening to me, too, under Ubuntu; I think it only started after some package updates. Although something else could have changed, too. I haven't dug too much.
This appears related to the recent discussions in https://github.com/fbchat-dev/fbchat/issues/613