Skip to content

Login issue AttributeError: 'NoneType' object has no attribute 'group' #565

@Tantol

Description

@Tantol

Description of the problem

Login issue AttributeError: 'NoneType' object has no attribute 'group'

Code to reproduce

# Example code
from fbchat import Client
from fbchat.models import *
client = Client('...', '...')
client.logout()
print("end")

Traceback

Traceback (most recent call last):
  File "/home/xxx/.local/lib/python3.6/site-packages/fbchat/_client.py", line 209, in login
    user_agent=user_agent,
  File "/home/xxx/.local/lib/python3.6/site-packages/fbchat/_state.py", line 149, in login
    return cls.from_session(session=session)
  File "/home/xxx/.local/lib/python3.6/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 3
  • fbchat newest

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions