Closed salehinRafi closed 6 years ago
I encounter this problem when I try to follow messenger.py example. I try use Bottle and Flask. The Same problem occurs.
**o.__class__.__name__) TypeError: Object of type 'bytes' is not JSON serializable**
When I change this line 88 in pywit/examples/messenger.py code as below::-
data = { 'recipient': {'id': sender_id}, 'message': {'text': text.decode('utf-8')} }
The problem is resolved.
I use ngrok, virtualenv as my environment development.
original was
data = { 'recipient': {'id': sender_id}, 'message': {'text': text} }
I encounter this problem when I try to follow messenger.py example. I try use Bottle and Flask. The Same problem occurs.
When I change this line 88 in pywit/examples/messenger.py code as below::-
The problem is resolved.
I use ngrok, virtualenv as my environment development.