Logging fails with specific user. I am not using client.logout() in my code
The program works fine with other facebook accounts but it doesn't work on this one.
Code to reproduce
def getCredentials():
#Retrieves the values
with open('credentials.txt') as json_file:
data = json.load(json_file)
for p in data['credentials']:
email = p['email']
password = p['password']
message = p['message']
return email,password,message
credentials = getCredentials()
message = credentials[2]
client = Client(credentials[0], credentials[1])
Traceback
Attempt #4 failed, retrying
Traceback (most recent call last):
File "C:\Users\kdalanon\AppData\Local\Programs\Python\Python38\lib\site-packages\fbchat\_client.py", line 205, in login
self._state = State.login(
File "C:\Users\kdalanon\AppData\Local\Programs\Python\Python38\lib\site-packages\fbchat\_state.py", line 149, in login
return cls.from_session(session=session)
File "C:\Users\kdalanon\AppData\Local\Programs\Python\Python38\lib\site-packages\fbchat\_state.py", line 186, in from_session
fb_dtsg = FB_DTSG_REGEX.search(r.text).group(1)
AttributeError: 'NoneType' object has no attribute 'group'
Traceback (most recent call last):
File "fb.py", line 357, in <module>
client = Client(credentials[0], credentials[1])
File "C:\Users\kdalanon\AppData\Local\Programs\Python\Python38\lib\site-packages\fbchat\_client.py", line 103, in __init__
self.login(email, password, max_tries, user_agent=user_agent)
File "C:\Users\kdalanon\AppData\Local\Programs\Python\Python38\lib\site-packages\fbchat\_client.py", line 205, in login
self._state = State.login(
File "C:\Users\kdalanon\AppData\Local\Programs\Python\Python38\lib\site-packages\fbchat\_state.py", line 149, in login
return cls.from_session(session=session)
File "C:\Users\kdalanon\AppData\Local\Programs\Python\Python38\lib\site-packages\fbchat\_state.py", line 186, in from_session
fb_dtsg = FB_DTSG_REGEX.search(r.text).group(1)
AttributeError: 'NoneType' object has no attribute 'group'
Environment information
- Python version 3
fbchat version
- If relevant, output from
$ python -m pip list
If you have done any research, include that.
Make sure to redact all personal information.
Logging fails with specific user. I am not using client.logout() in my code
The program works fine with other facebook accounts but it doesn't work on this one.
Code to reproduce
def getCredentials():
credentials = getCredentials()
message = credentials[2]
client = Client(credentials[0], credentials[1])
Traceback
Environment information
fbchatversion$ python -m pip listIf you have done any research, include that.
Make sure to redact all personal information.