question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

sendLocalImage is broken?

See original GitHub issue

This is on the latest version on pypi:

Traceback (most recent call last):
[...]
  File "[...]/fbchat/client.py", line 1037, in sendLocalImage
    return self.sendImage(image_id=image_id, message=message, thread_id=thread_id, thread_type=thread_type, is_gif=is_gif)
  File "[...]/fbchat/client.py", line 990, in sendImage
    data = self._getSendData(message=message, thread_id=thread_id, thread_type=thread_type)
  File "[...]/fbchat/client.py", line 898, in _getSendData
    if message.text or message.sticker or message.emoji_size:
AttributeError: 'str' object has no attribute 'text'

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
madsmtmcommented, Jan 5, 2018

I know what the issue is, it happened after I changed the message parameter to be able to be defined as a Message object, instead of a string, but I must have forgotten to include a translation from strings to the Message object in sendLocalImage. I’ll fix it in a few hours, in v1.2.1

0reactions
satishegovcommented, Apr 10, 2018

hey #dmoonat still i am not able to rectify the bug ,could you send the complete code .

Read more comments on GitHub >

github_iconTop Results From Across the Web

client.sendLocalImage not working · Issue #85 · fbchat-dev ...
Traceback (most recent call last): File "C:\Users\Smit\Desktop\test1.py", line 11, in client.sendLocalImage(friend.uid,message='opppsssss' ...
Read more >
Facebook Messenger Platform Send Local Image Attachment
The Messenger Platform allows you to attach assets to messages, including audio, video, images, and files. The maximum attachment size is 25 MB....
Read more >
fbchat Documentation
sendLocalImage ('<image path>', message=Message(text='This is a local ... you think some of the functionality is broken, please feel free to.
Read more >
Python fbchat library - Javatpoint
This function is used to send messages to a user or a group. 2, sendLocalImage, This function is used to send an Image...
Read more >
v2 to v3 Migration Guide - Advanced-Command-Handler Guide
Migration from v2 to v3 · How to install it · Breaking changes · Added ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found