Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error with logout function #556

Open
Callen93 opened this issue Apr 19, 2020 · 0 comments
Open

Error with logout function #556

Callen93 opened this issue Apr 19, 2020 · 0 comments
Labels

Comments

@Callen93
Copy link

Callen93 commented Apr 19, 2020

Description of the problem

When trying to logout an active session created from session cookies, an error occurs.

Code to reproduce

session = fbchat.Session.from_cookies(cookie)
client = fbchat.Client(session=session)
session.logout()  

Traceback

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/.../fbchat-master/fbchat/_session.py", line 289, in logout
    logout_h = re.search(r'name=\\"h\\" value=\\"(.*?)\\"', h_r.text).group(1)
AttributeError: 'NoneType' object has no attribute 'group'

Environment information

  • Python3.5
  • fbchat 2.0.0a2

This error is not exclusive to v2. I'm getting same error using version 1.8.1 of fbchat. However I don't know if this error already existed or if a modification of fb handling of logout broke something (I've never used this functionality).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants