fbchat-dev / fbchat

Facebook Chat (Messenger) for Python
https://fbchat.readthedocs.io
BSD 3-Clause "New" or "Revised" License
1.19k stars 412 forks source link

client.sendLocalImage not working #85

Closed smitgardhariya closed 7 years ago

smitgardhariya commented 7 years ago

Traceback (most recent call last): File "C:\Users\Smit\Desktop\test1.py", line 11, in client.sendLocalImage(friend.uid,message='opppsssss',image=os.getcwd()+'\mamu.jpg') File "C:\Python27\lib\site-packages\fbchat\client.py", line 317, in sendLocalImage image_id = self.uploadImage({'file': (image, open(image), mimetype)}) File "C:\Python27\lib\site-packages\fbchat\client.py", line 327, in uploadImage return json.loads(r._content[9:])['payload']['metadata'][0]['image_id'] IndexError: list index out of range

Dainius14 commented 7 years ago

Sending images is still not possible. I'm getting error 'charmap' codec can't decode byte X in position Y: character maps to <undefined> in _postFile() method in self._session.post(url, data=payload, timeout=timeout, files=files) line.

madsmtm commented 7 years ago

Assuming this is fixed in the current version ;)