fbchat-dev/fbchat

client.send() is not working

Open

#303 geöffnet am 20. Juni 2018

Auf GitHub ansehen
 (8 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)Python (406 Forks)github user discovery
bughelp wanted

Repository-Metriken

Stars
 (1.210 Stars)
PR-Merge-Metriken
 (PR-Metriken ausstehend)

Beschreibung

After login succesfully i am executing this statement client.send(Message(text='Hi me'), thread_id=client.uid, thread_type=ThreadType.USER) below is the error

Traceback (most recent call last):
  File "fbTest.py", line 19, in <module>
    msg_id = client.send(Message(text='Hi me'), thread_id=client.uid, thread_type=ThreadType.USER)
  File "C:\Python27\lib\site-packages\fbchat\client.py", line 951, in send    return self._doSendRequest(data)
  File "C:\Python27\lib\site-packages\fbchat\client.py", line 919, in _doSendRequest
    j = self._post(self.req_url.SEND, data, fix_request=True, as_json=True)
  File "C:\Python27\lib\site-packages\fbchat\client.py", line 127, in _post return check_request(r, as_json=as_json)
  File "C:\Python27\lib\site-packages\fbchat\utils.py", line 209, in check_request
    content = strip_to_json(content)
  File "C:\Python27\lib\site-packages\fbchat\utils.py", line 146, in strip_to_json
    raise FBchatException('No JSON object found: {}, {}'.format(repr(text), text.index('{')))
ValueError: substring not found

Contributor Guide