davidchua / pymessenger

A Python Wrapper for the FB Messenger Bot API (Send/Receive API)
MIT License
457 stars 185 forks source link

How to get attachment URL #71

Open dulkith opened 5 years ago

dulkith commented 5 years ago

When i try to get attachement application is stuck, not respone after sending attachement.

bot.send_attachment_url(recipient_id, att['type'], att['payload']['url'])

### ERROR: 127.0.0.1 - - [09/May/2019 13:18:18] "POST / HTTP/1.1" 500 - Traceback (most recent call last): File "/usr/local/lib/python3.5/dist-packages/flask/app.py", line 1997, in __call__ return self.wsgi_app(environ, start_response) File "/usr/local/lib/python3.5/dist-packages/flask/app.py", line 1985, in wsgi_app response = self.handle_exception(e) File "/usr/local/lib/python3.5/dist-packages/flask/app.py", line 1540, in handle_exception reraise(exc_type, exc_value, tb) File "/usr/local/lib/python3.5/dist-packages/flask/_compat.py", line 33, in reraise raise value File "/usr/local/lib/python3.5/dist-packages/flask/app.py", line 1982, in wsgi_app response = self.full_dispatch_request() File "/usr/local/lib/python3.5/dist-packages/flask/app.py", line 1614, in full_dispatch_request rv = self.handle_user_exception(e) File "/usr/local/lib/python3.5/dist-packages/flask/app.py", line 1517, in handle_user_exception reraise(exc_type, exc_value, tb) File "/usr/local/lib/python3.5/dist-packages/flask/_compat.py", line 33, in reraise raise value File "/usr/local/lib/python3.5/dist-packages/flask/app.py", line 1612, in full_dispatch_request rv = self.dispatch_request() File "/usr/local/lib/python3.5/dist-packages/flask/app.py", line 1598, in dispatch_request return self.view_functions[rule.endpoint](**req.view_args) File "/home/duka/fb_chat_bot/app.py", line 35, in hello bot.send_attachment_url(recipient_id, att['type'], att['payload']['url']) AttributeError: 'Bot' object has no attribute 'send_attachment_url'

davidchua commented 5 years ago

Hi @dulkith, we have not released a new pip version which contains the updated functions.

I'm planning to make a version release soon but in the meantime, you can try installing from master branch by running pip install -e . when you're in the root directory of this repo.