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

[Bug]: tgcustom_keyboard not working #290

Open
1 task done
napalmz opened this issue Oct 25, 2023 · 2 comments
Open
1 task done

[Bug]: tgcustom_keyboard not working #290

napalmz opened this issue Oct 25, 2023 · 2 comments
Assignees
Labels
bug Something isn't working
Projects

Comments

@napalmz
Copy link

napalmz commented Oct 25, 2023

What happened and in what context?

I created a macro to send a message with buttons but each time it is called, nothing happens. Only an error is produced in the logs.

This is the macro:

[gcode_macro _TG_SHUTDOWN_IMMINENT]
gcode:
    {% set bot_msg = "message='Shutdown in 15 min.', buttons=[{name='Stop', command='SHUTDOWN_ABORT'},{name='Cancel', command='delete'}]" %}
    RESPOND PREFIX=tgcustom_keyboard MSG="{bot_msg}"

If needed, paste the relevant bot log contents here.

2023-10-25 13:15:25,397 - websocket_helper - ERROR - <telegram.inline.inlinekeyboardbutton.InlineKeyboardButton object at 0x7f70f8e340> is not JSON serializable
2023-10-25 13:17:17,493 - websocket_helper - ERROR - <telegram.inline.inlinekeyboardbutton.InlineKeyboardButton object at 0x7f70f99740> is not JSON serializable
2023-10-25 13:22:21,660 - websocket_helper - ERROR - <telegram.inline.inlinekeyboardbutton.InlineKeyboardButton object at 0x7f70f996c0> is not JSON serializable
2023-10-25 13:24:57,296 - websocket_helper - ERROR - <telegram.inline.inlinekeyboardbutton.InlineKeyboardButton object at 0x7f70f8e3c0> is not JSON serializable
2023-10-25 13:27:03,812 - websocket_helper - ERROR - <telegram.inline.inlinekeyboardbutton.InlineKeyboardButton object at 0x7f70f997c0> is not JSON serializable

If needed, paste the relevant bot journal contents here.

-- Journal begins at Wed 2023-10-25 10:17:04 CEST, ends at Wed 2023-10-25 13:33:56 CEST. --
Oct 25 13:28:53 raspberrypi2 python[2062]: 2023-10-25 13:28:53,499 - apscheduler.scheduler - INFO - Removed job ws_reschedule
Oct 25 13:28:53 raspberrypi2 python[2062]: 2023-10-25 13:28:53,483 - websocket_helper - WARNING - Error received from websocket: {'code': -32601, 'message': 'Method not found'}
Oct 25 13:28:53 raspberrypi2 python[2062]: 2023-10-25 13:28:53,480 - apscheduler.executors.default - INFO - Job "WebSocketHelper.reshedule (trigger: interval[0:00:02], next run at: 2023-10-25 13:28:55 CEST)" executed successfully
Oct 25 13:28:53 raspberrypi2 python[2062]: 2023-10-25 13:28:53,479 - apscheduler.executors.default - INFO - Running job "WebSocketHelper.reshedule (trigger: interval[0:00:02], next run at: 2023-10-25 13:28:55 CEST)" (scheduled at 2023-10-25 13:28:53.478134+02:00)
Oct 25 13:28:51 raspberrypi2 python[2062]: 2023-10-25 13:28:51,478 - apscheduler.scheduler - INFO - Added job "WebSocketHelper.reshedule" to job store "default"
Oct 25 13:28:51 raspberrypi2 python[2062]: 2023-10-25 13:28:51,466 - websocket_helper - WARNING - Error received from websocket: {'code': -32601, 'message': 'Method not found'}
Oct 25 13:28:51 raspberrypi2 python[2062]: 2023-10-25 13:28:51,462 - apscheduler.executors.default - INFO - Job "WebSocketHelper.reshedule (trigger: interval[0:00:02], next run at: 2023-10-25 13:28:53 CEST)" executed successfully
Oct 25 13:28:51 raspberrypi2 python[2062]: 2023-10-25 13:28:51,462 - apscheduler.executors.default - INFO - Running job "WebSocketHelper.reshedule (trigger: interval[0:00:02], next run at: 2023-10-25 13:28:53 CEST)" (scheduled at 2023-10-25 13:28:51.461164+02:00)
Oct 25 13:28:49 raspberrypi2 python[2062]: 2023-10-25 13:28:49,461 - apscheduler.scheduler - INFO - Added job "WebSocketHelper.reshedule" to job store "default"
Oct 25 13:28:49 raspberrypi2 python[2062]: 2023-10-25 13:28:49,460 - klippy - ERROR - Klippy Host not connected
Oct 25 13:28:49 raspberrypi2 python[2062]: 2023-10-25 13:28:49,438 - websocket_helper - WARNING - klippy disconnect detected with message: notify_klippy_disconnected
Oct 25 13:27:03 raspberrypi2 python[2062]: 2023-10-25 13:27:03,812 - websocket_helper - ERROR - <telegram.inline.inlinekeyboardbutton.InlineKeyboardButton object at 0x7f70f997c0> is not JSON serializable
Oct 25 13:27:03 raspberrypi2 python[2062]: 2023-10-25 13:27:03,811 - websocket - ERROR - error from callback <bound method WebSocketHelper.websocket_to_message of <websocket_helper.WebSocketHelper object at 0x7f812a4520>>: <telegram.inline.inlinekeyboardbutton.InlineKeyboardButton object at 0x7f70f997c0> is not JSON serializable
Oct 25 13:26:58 raspberrypi2 python[2062]: 2023-10-25 13:26:58,458 - apscheduler.scheduler - INFO - Removed job ws_reschedule
Oct 25 13:26:58 raspberrypi2 python[2062]: 2023-10-25 13:26:58,440 - websocket_helper - WARNING - Error received from websocket: {'code': -32601, 'message': 'Method not found'}
Oct 25 13:26:58 raspberrypi2 python[2062]: 2023-10-25 13:26:58,429 - apscheduler.executors.default - INFO - Job "WebSocketHelper.reshedule (trigger: interval[0:00:02], next run at: 2023-10-25 13:27:00 CEST)" executed successfully
Oct 25 13:26:58 raspberrypi2 python[2062]: 2023-10-25 13:26:58,428 - apscheduler.executors.default - INFO - Running job "WebSocketHelper.reshedule (trigger: interval[0:00:02], next run at: 2023-10-25 13:27:00 CEST)" (scheduled at 2023-10-25 13:26:58.427098+02:00)
Oct 25 13:26:56 raspberrypi2 python[2062]: 2023-10-25 13:26:56,427 - apscheduler.scheduler - INFO - Added job "WebSocketHelper.reshedule" to job store "default"
Oct 25 13:26:56 raspberrypi2 python[2062]: 2023-10-25 13:26:56,401 - websocket_helper - WARNING - Error received from websocket: {'code': -32601, 'message': 'Method not found'}
Oct 25 13:26:56 raspberrypi2 python[2062]: 2023-10-25 13:26:56,398 - apscheduler.executors.default - INFO - Job "WebSocketHelper.reshedule (trigger: interval[0:00:02], next run at: 2023-10-25 13:26:58 CEST)" executed successfully
Oct 25 13:26:56 raspberrypi2 python[2062]: 2023-10-25 13:26:56,397 - apscheduler.executors.default - INFO - Running job "WebSocketHelper.reshedule (trigger: interval[0:00:02], next run at: 2023-10-25 13:26:58 CEST)" (scheduled at 2023-10-25 13:26:56.396634+02:00)
Oct 25 13:26:54 raspberrypi2 python[2062]: 2023-10-25 13:26:54,397 - apscheduler.scheduler - INFO - Added job "WebSocketHelper.reshedule" to job store "default"
Oct 25 13:26:54 raspberrypi2 python[2062]: 2023-10-25 13:26:54,395 - klippy - ERROR - Klippy Host not connected
Oct 25 13:26:54 raspberrypi2 python[2062]: 2023-10-25 13:26:54,380 - websocket_helper - WARNING - klippy disconnect detected with message: notify_klippy_disconnected
Oct 25 13:24:57 raspberrypi2 python[2062]: 2023-10-25 13:24:57,296 - websocket_helper - ERROR - <telegram.inline.inlinekeyboardbutton.InlineKeyboardButton object at 0x7f70f8e3c0> is not JSON serializable
Oct 25 13:24:57 raspberrypi2 python[2062]: 2023-10-25 13:24:57,296 - websocket - ERROR - error from callback <bound method WebSocketHelper.websocket_to_message of <websocket_helper.WebSocketHelper object at 0x7f812a4520>>: <telegram.inline.inlinekeyboardbutton.InlineKeyboardButton object at 0x7f70f8e3c0> is not JSON serializable
Oct 25 13:24:50 raspberrypi2 python[2062]: 2023-10-25 13:24:50,889 - apscheduler.scheduler - INFO - Removed job ws_reschedule
Oct 25 13:24:50 raspberrypi2 python[2062]: 2023-10-25 13:24:50,875 - websocket_helper - WARNING - Error received from websocket: {'code': -32601, 'message': 'Method not found'}
Oct 25 13:24:50 raspberrypi2 python[2062]: 2023-10-25 13:24:50,865 - apscheduler.executors.default - INFO - Job "WebSocketHelper.reshedule (trigger: interval[0:00:02], next run at: 2023-10-25 13:24:52 CEST)" executed successfully
Oct 25 13:24:50 raspberrypi2 python[2062]: 2023-10-25 13:24:50,864 - apscheduler.executors.default - INFO - Running job "WebSocketHelper.reshedule (trigger: interval[0:00:02], next run at: 2023-10-25 13:24:52 CEST)" (scheduled at 2023-10-25 13:24:50.862863+02:00)
Oct 25 13:24:48 raspberrypi2 python[2062]: 2023-10-25 13:24:48,863 - apscheduler.scheduler - INFO - Added job "WebSocketHelper.reshedule" to job store "default"
Oct 25 13:24:48 raspberrypi2 python[2062]: 2023-10-25 13:24:48,850 - websocket_helper - WARNING - Error received from websocket: {'code': -32601, 'message': 'Method not found'}
Oct 25 13:24:48 raspberrypi2 python[2062]: 2023-10-25 13:24:48,846 - apscheduler.executors.default - INFO - Job "WebSocketHelper.reshedule (trigger: interval[0:00:02], next run at: 2023-10-25 13:24:50 CEST)" executed successfully
Oct 25 13:24:48 raspberrypi2 python[2062]: 2023-10-25 13:24:48,845 - apscheduler.executors.default - INFO - Running job "WebSocketHelper.reshedule (trigger: interval[0:00:02], next run at: 2023-10-25 13:24:50 CEST)" (scheduled at 2023-10-25 13:24:48.845030+02:00)
Oct 25 13:24:46 raspberrypi2 python[2062]: 2023-10-25 13:24:46,845 - apscheduler.scheduler - INFO - Added job "WebSocketHelper.reshedule" to job store "default"
Oct 25 13:24:46 raspberrypi2 python[2062]: 2023-10-25 13:24:46,843 - klippy - ERROR - Klippy Host not connected
Oct 25 13:24:46 raspberrypi2 python[2062]: 2023-10-25 13:24:46,817 - websocket_helper - WARNING - klippy disconnect detected with message: notify_klippy_disconnected
Oct 25 13:22:21 raspberrypi2 python[2062]: 2023-10-25 13:22:21,660 - websocket_helper - ERROR - <telegram.inline.inlinekeyboardbutton.InlineKeyboardButton object at 0x7f70f996c0> is not JSON serializable
Oct 25 13:22:21 raspberrypi2 python[2062]: 2023-10-25 13:22:21,659 - websocket - ERROR - error from callback <bound method WebSocketHelper.websocket_to_message of <websocket_helper.WebSocketHelper object at 0x7f812a4520>>: <telegram.inline.inlinekeyboardbutton.InlineKeyboardButton object at 0x7f70f996c0> is not JSON serializable
Oct 25 13:22:03 raspberrypi2 python[2062]: 2023-10-25 13:22:03,035 - apscheduler.executors.default - INFO - Job "Notifier._send_message (trigger: date[2023-10-25 13:22:02 CEST], next run at: 2023-10-25 13:22:02 CEST)" executed successfully
Oct 25 13:22:02 raspberrypi2 python[2062]: 2023-10-25 13:22:02,677 - apscheduler.executors.default - INFO - Running job "Notifier._send_message (trigger: date[2023-10-25 13:22:02 CEST], next run at: 2023-10-25 13:22:02 CEST)" (scheduled at 2023-10-25 13:22:02.675243+02:00)
Oct 25 13:22:02 raspberrypi2 python[2062]: 2023-10-25 13:22:02,676 - apscheduler.scheduler - INFO - Removed job 1baea9f41ec045a8901914280d0fd927
Oct 25 13:22:02 raspberrypi2 python[2062]: 2023-10-25 13:22:02,675 - apscheduler.scheduler - INFO - Added job "Notifier._send_message" to job store "default"
Oct 25 13:20:14 raspberrypi2 python[2062]: 2023-10-25 13:20:14,072 - apscheduler.executors.default - INFO - Job "Notifier._send_message (trigger: date[2023-10-25 13:20:13 CEST], next run at: 2023-10-25 13:20:13 CEST)" executed successfully
Oct 25 13:20:13 raspberrypi2 python[2062]: 2023-10-25 13:20:13,647 - apscheduler.executors.default - INFO - Running job "Notifier._send_message (trigger: date[2023-10-25 13:20:13 CEST], next run at: 2023-10-25 13:20:13 CEST)" (scheduled at 2023-10-25 13:20:13.644093+02:00)
Oct 25 13:20:13 raspberrypi2 python[2062]: 2023-10-25 13:20:13,645 - apscheduler.scheduler - INFO - Removed job 6ed9d1066f8b4787a63a210eab660e8f
Oct 25 13:20:13 raspberrypi2 python[2062]: 2023-10-25 13:20:13,644 - apscheduler.scheduler - INFO - Added job "Notifier._send_message" to job store "default"
Oct 25 13:17:17 raspberrypi2 python[2062]: 2023-10-25 13:17:17,493 - websocket_helper - ERROR - <telegram.inline.inlinekeyboardbutton.InlineKeyboardButton object at 0x7f70f99740> is not JSON serializable
Oct 25 13:17:17 raspberrypi2 python[2062]: 2023-10-25 13:17:17,492 - websocket - ERROR - error from callback <bound method WebSocketHelper.websocket_to_message of <websocket_helper.WebSocketHelper object at 0x7f812a4520>>: <telegram.inline.inlinekeyboardbutton.InlineKeyboardButton object at 0x7f70f99740> is not JSON serializable
Oct 25 13:17:06 raspberrypi2 python[2062]: 2023-10-25 13:17:06,868 - apscheduler.scheduler - INFO - Removed job ws_reschedule
Oct 25 13:17:06 raspberrypi2 python[2062]: 2023-10-25 13:17:06,835 - websocket_helper - WARNING - Error received from websocket: {'code': -32601, 'message': 'Method not found'}
Oct 25 13:17:06 raspberrypi2 python[2062]: 2023-10-25 13:17:06,829 - apscheduler.executors.default - INFO - Job "WebSocketHelper.reshedule (trigger: interval[0:00:02], next run at: 2023-10-25 13:17:08 CEST)" executed successfully
Oct 25 13:17:06 raspberrypi2 python[2062]: 2023-10-25 13:17:06,828 - apscheduler.executors.default - INFO - Running job "WebSocketHelper.reshedule (trigger: interval[0:00:02], next run at: 2023-10-25 13:17:08 CEST)" (scheduled at 2023-10-25 13:17:06.827683+02:00)
Oct 25 13:17:04 raspberrypi2 python[2062]: 2023-10-25 13:17:04,828 - apscheduler.scheduler - INFO - Added job "WebSocketHelper.reshedule" to job store "default"
Oct 25 13:17:04 raspberrypi2 python[2062]: 2023-10-25 13:17:04,815 - websocket_helper - WARNING - Error received from websocket: {'code': -32601, 'message': 'Method not found'}
Oct 25 13:17:04 raspberrypi2 python[2062]: 2023-10-25 13:17:04,812 - apscheduler.executors.default - INFO - Job "WebSocketHelper.reshedule (trigger: interval[0:00:02], next run at: 2023-10-25 13:17:06 CEST)" executed successfully
Oct 25 13:17:04 raspberrypi2 python[2062]: 2023-10-25 13:17:04,811 - apscheduler.executors.default - INFO - Running job "WebSocketHelper.reshedule (trigger: interval[0:00:02], next run at: 2023-10-25 13:17:06 CEST)" (scheduled at 2023-10-25 13:17:04.810077+02:00)
Oct 25 13:17:02 raspberrypi2 python[2062]: 2023-10-25 13:17:02,811 - apscheduler.scheduler - INFO - Added job "WebSocketHelper.reshedule" to job store "default"
Oct 25 13:17:02 raspberrypi2 python[2062]: 2023-10-25 13:17:02,809 - klippy - ERROR - Klippy Host not connected
Oct 25 13:17:02 raspberrypi2 python[2062]: 2023-10-25 13:17:02,787 - websocket_helper - WARNING - klippy disconnect detected with message: notify_klippy_disconnected
Oct 25 13:15:25 raspberrypi2 python[2062]: 2023-10-25 13:15:25,397 - websocket_helper - ERROR - <telegram.inline.inlinekeyboardbutton.InlineKeyboardButton object at 0x7f70f8e340> is not JSON serializable
Oct 25 13:15:25 raspberrypi2 python[2062]: 2023-10-25 13:15:25,397 - websocket - ERROR - error from callback <bound method WebSocketHelper.websocket_to_message of <websocket_helper.WebSocketHelper object at 0x7f812a4520>>: <telegram.inline.inlinekeyboardbutton.InlineKeyboardButton object at 0x7f70f8e340> is not JSON serializable
Oct 25 13:15:17 raspberrypi2 python[2062]: 2023-10-25 13:15:17,328 - apscheduler.scheduler - INFO - Removed job ws_reschedule
Oct 25 13:15:17 raspberrypi2 python[2062]: 2023-10-25 13:15:17,308 - websocket_helper - WARNING - Error received from websocket: {'code': -32601, 'message': 'Method not found'}
Oct 25 13:15:17 raspberrypi2 python[2062]: 2023-10-25 13:15:17,298 - apscheduler.executors.default - INFO - Job "WebSocketHelper.reshedule (trigger: interval[0:00:02], next run at: 2023-10-25 13:15:19 CEST)" executed successfully
Oct 25 13:15:17 raspberrypi2 python[2062]: 2023-10-25 13:15:17,296 - apscheduler.executors.default - INFO - Running job "WebSocketHelper.reshedule (trigger: interval[0:00:02], next run at: 2023-10-25 13:15:19 CEST)" (scheduled at 2023-10-25 13:15:17.294234+02:00)
Oct 25 13:15:15 raspberrypi2 python[2062]: 2023-10-25 13:15:15,294 - apscheduler.scheduler - INFO - Added job "WebSocketHelper.reshedule" to job store "default"
Oct 25 13:15:15 raspberrypi2 python[2062]: 2023-10-25 13:15:15,281 - websocket_helper - WARNING - Error received from websocket: {'code': -32601, 'message': 'Method not found'}
Oct 25 13:15:15 raspberrypi2 python[2062]: 2023-10-25 13:15:15,277 - apscheduler.executors.default - INFO - Job "WebSocketHelper.reshedule (trigger: interval[0:00:02], next run at: 2023-10-25 13:15:17 CEST)" executed successfully
Oct 25 13:15:15 raspberrypi2 python[2062]: 2023-10-25 13:15:15,276 - apscheduler.executors.default - INFO - Running job "WebSocketHelper.reshedule (trigger: interval[0:00:02], next run at: 2023-10-25 13:15:17 CEST)" (scheduled at 2023-10-25 13:15:15.275335+02:00)
Oct 25 13:15:13 raspberrypi2 python[2062]: 2023-10-25 13:15:13,276 - apscheduler.scheduler - INFO - Added job "WebSocketHelper.reshedule" to job store "default"
Oct 25 13:15:13 raspberrypi2 python[2062]: 2023-10-25 13:15:13,274 - klippy - ERROR - Klippy Host not connected
Oct 25 13:15:13 raspberrypi2 python[2062]: 2023-10-25 13:15:13,253 - websocket_helper - WARNING - klippy disconnect detected with message: notify_klippy_disconnected

What branch does this occur on?

development

Reports only on latest master or development branches!

  • I have updated to latest development/master version before submitting the bug
@napalmz napalmz added the bug Something isn't working label Oct 25, 2023
@Wildecity
Copy link

Have you found any solution to this? I'm having the same issue

@nlef nlef self-assigned this Jan 6, 2024
@nlef nlef added this to Unsorted bug reports in Bugs via automation Jan 6, 2024
@nlef
Copy link
Owner

nlef commented Jun 7, 2024

commit 11b6893 should fix this issue
@Wildecity could you test it?

@nlef nlef moved this from Unsorted bug reports to In testing in Bugs Jun 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Bugs
In testing
Development

No branches or pull requests

3 participants