Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: Object of type 'Message' is not JSON serializable #1

Open
EvgeniyAlf opened this issue Sep 3, 2020 · 0 comments
Open

TypeError: Object of type 'Message' is not JSON serializable #1

EvgeniyAlf opened this issue Sep 3, 2020 · 0 comments

Comments

@EvgeniyAlf
Copy link

Sep 3 17:48:31 ####### postfix/pipe[9909]: 4E2D6614394E: to=<####@#######.ru>, relay=telegram-mailgate, delay=1.1, delays=0.43/0/0/0.72, dsn=5.3.0, status=bounced (Command died with status 1: "/usr/local/bin/telegram-mailgate.py". Command output: Traceback (most recent call last): File "/usr/local/bin/telegram-mailgate.py", line 87, in bot.sendMessage(chat_id=chat_id, text=content) File "", line 2, in send_message File "/home/telegram-mailer/.local/lib/python3.6/site-packages/telegram/bot.py", line 67, in decorator result = func(*args, **kwargs) File "/home/telegram-mailer/.local/lib/python3.6/site-packages/telegram/bot.py", line 348, in send_message timeout=timeout, **kwargs) File "/home/telegram-mailer/.local/lib/python3.6/site-packages/telegram/bot.py", line 175, in _message result = self._request.post(url, data, timeout=timeout) File "/home/telegram-mailer/.local/lib/python3.6/site-packages/telegram/utils/request.py", line 331, in post body=json.dumps(data).encode('utf-8'), File "/usr/lib64/python3.6/json/init.py", line 231, in dumps return _default_encoder.encode(obj) File "/usr/lib64/python3.6/json/encoder.py", line 199, in encode chunks = self.iterencode(o, _one_shot=True) File "/usr/lib64/python3.6/json/encoder.py", line 257, in iterencode return _iterencode(o, 0) File "/usr/lib64/python3.6/json/encoder.py", line 180, in default o.class.name) TypeError: Object of type 'Message' is not JSON serializable )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant