fbchat-dev/fbchat

error since yesterday

N0NameN0 opened this issue · 7 comments

Anything change at FB side ?

Traceback (most recent call last):
File "./sendFB.py", line 37, in
session = fbchat.Session.login("XXXXXXX", "XXXXXXXX")
File "/usr/local/lib/python3.5/dist-packages/fbchat/_session.py", line 377, in login
return cls._from_session(session=session)
File "/usr/local/lib/python3.5/dist-packages/fbchat/_session.py", line 434, in _from_session
define = parse_server_js_define(r.content.decode("utf-8"))
File "/usr/local/lib/python3.5/dist-packages/fbchat/_session.py", line 36, in parse_server_js_define
raise _exception.ParseError("Could not find any ServerJSDefine", data=html)
fbchat.ParseError: Could not find any ServerJSDefine. Please report this, along with the data below!

work again ;)

the bug is back...
fbchat : 2.0.0a5
python : 3.5.3

on this simple sample code :

import fbchat

# Log the user in
session = fbchat.Session.login("XXXX@XXXX.XXX", "XXXXX")

print("Own id: {}".format(session.user.id))

# Send a message to yourself
session.user.send_text("Hi me!")

# Log the user out
session.logout()

got this error :

# python3 test.py 

Traceback (most recent call last):
  File "test.py", line 4, in <module>
    session = fbchat.Session.login("XXXX@XXXX.XXX", "XXXX")
  File "/usr/local/lib/python3.5/dist-packages/fbchat/_session.py", line 377, in login
    return cls._from_session(session=session)
  File "/usr/local/lib/python3.5/dist-packages/fbchat/_session.py", line 434, in _from_session
    define = parse_server_js_define(r.content.decode("utf-8"))
  File "/usr/local/lib/python3.5/dist-packages/fbchat/_session.py", line 36, in parse_server_js_define
    raise _exception.ParseError("Could not find any ServerJSDefine", data=html)
fbchat.ParseError: Could not find any ServerJSDefine. Please report this, along with the data below!

+1 Same for me

Made a fix for it and a pull request: #630

You'll have to wait until someone takes over the repo for it to get merged. Or pull it yourself.

Made a fix for it and a pull request: #630

You'll have to wait until someone takes over the repo for it to get merged. Or pull it yourself.

Perfect it works !! Thx !

Made a fix for it and a pull request: #630

You'll have to wait until someone takes over the repo for it to get merged. Or pull it yourself.

Hi, this PR did not do the trick for me. Any ideas on how this problem can be fixed?

in parse_server_js_define
raise _exception.ParseError("Could not find any ServerJSDefine", data_file=file_name)
fbchat.ParseError: Could not find any ServerJSDefine.
they tell me to report this