Closed aferende closed 9 years ago
I don't exactly know what you mean...
replay('\r\n') .... just give error ! Ty
ok then pls send your code thanks.
the code is this:
reply('\r\n')
it gives error about encoding
Telegram does not accept empty strings. Just a bunch of new line characters will resolve to an empty string.
Anyway paste the exact error shown.
This is the exact error code:
'ascii' codec can't decode byte 0xc3 in position 24: ordinal not in range(128) Traceback (most recent call last): File "/base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py", line 1535, in call rv = self.handle_exception(request, response, e) File "/base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py", line 1529, in call rv = self.router.dispatch(request, response) File "/base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py", line 1278, in default_dispatcher return route.handler_adapter(request, response) File "/base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py", line 1102, in call return handler.dispatch() File "/base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py", line 572, in dispatch return self.handle_exception(e, self.app.debug) File "/base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py", line 570, in dispatch return method(_args, *_kwargs) File "/base/data/home/apps/e~afebot-telegram/1.386213561127088576/main.py", line 315, in post write('riga 1\r\nriga 2\r\nriga 3\r\nàèìòù') File "/base/data/home/apps/e~afebot-telegram/1.386213561127088576/main.py", line 90, in write 'text': msg.encode('utf-8'), UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 24: ordinal not in range(128)
TY
àèìòù ... seems responsabile of the error. \r\n now works fine (sure before won't work)
Ty for your work.
See #11
Oh ... great ! Now works fine. Ty again.
Hello, if I try to send a CR+LF using replay ... it say HTTP 400, bad request.
Any help will be appreciated. Ty.