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.


I recently implemented the bot example using django. However the fb send api returned an error of internal failure related to oauth.

{"error":{"message":"(#-1) Send API unexpected internal error","type":"OAuthException","code":-1,"error_subcode":2018012,"fbtrace_id":"BZ8p\/q9haBY"}}

The problem is related to the message object ,as you might read, text must be UTF-8 encoded and less than 640char.

All the library is beautifully written and respects UNICODE, however text must be encoded as follows:


so that it can reliably echo back text messages.

If you agree I can make a pull request modifying Page.send(…) such that

text = message if isinstance(message, str) else None is changed for

text = message if isinstance(message, str) else message.encode('utf-8') if isinstance(message,unicode) else None

This will allow it to support unicode strings and respect facebook´s api.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

kimwzcommented, Jun 5, 2017

Thank you all. fixed

kimwzcommented, Dec 26, 2016

Thanks merged.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to solve unicode encoding issues - Invivoo
In ths new article, our expert will explain you how to solve unicode encoding issues. If you have any question, don't hesite to...
Read more >
Solving character encoding problems - jAlbum Wiki
Solving character encoding problems · 1 Background · 2 Problem · 3 Solutions · 4 Configuring jAlbum · 5 FTP and broken links...
Read more >
Encoding issues - HaskellWiki
Character encoding is a tricky issue. Different systems have different conventions, and they may not be correct for a particular use.
Read more >
General Performance And Encoding Issues - OBS Studio
In some cases, OBS will say "Encoding overloaded!" on its status bar, meaning that your computer can't encode your video fast enough to...
Read more >
Troubleshooting special character encoding issues in ... - IBM
Resolving the problem. By default WebSphere Commerce uses UTF-8 character encoding. There are a few different places within the application ...
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 Post

No results found

github_iconTop Related Hashnode Post

No results found