Skip to content

Error with logout function #556

Description

@Callen93

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions