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]: Timelapse compilation error #212

Closed
1 task done
DrDaveone opened this issue Oct 23, 2022 · 2 comments
Closed
1 task done

[Bug]: Timelapse compilation error #212

DrDaveone opened this issue Oct 23, 2022 · 2 comments
Assignees
Labels
bug Something isn't working
Projects

Comments

@DrDaveone
Copy link

What happened and in what context?

x86: Debian 11.5 kenel 5.10.0-18-amd64
tgbot: b2a9ad3: v1.4.5.1, py3.9

issue: не делает таймлапсы.
лог: после конфига 00:24 ошибка после запуска, 00:57 сборка таймлапса

If needed, paste the relevant bot log contents here.

No response

If needed, paste the relevant bot journal contents here.


Current Moonraker telegram bot config
[bot]
server = localhost

[camera]
host = http://localhost:8080/?action=stream
flip_vertically = false
flip_horizontally = false
video_duration = 15
fourcc = mp4v
picture_quality = low
threads = 1
fps = 30
video_buffer_size = 2

[progress_notification]
percent = 10
height = 5

[timelapse]
cleanup = true
target_fps = 15
manual_mode = false
min_lapse_duration = 10
max_lapse_duration = 20
last_frame_duration = 2

[telegram_ui]
require_confirmation_macro = false
include_macros_in_command_list = true
progress_update_message = false
silent_progress = true
silent_status = true
hidden_macros = TIMELAPSE_STOP, TIMELAPSE_CREATE, TIMELAPSE_PHOTO, TIMELAPSE_START, LIFT_ME_UP, M300, M500

[status_message_content]
sensors = SKR Mcu, Host Cpu Temp
heaters = extruder, heater_bed


2022-10-24 00:24:29,756 - main - ERROR -

2022-10-24 00:24:36,822 - main - ERROR - Exception while handling an update:
Traceback (most recent call last):
File "/home/klipper/moonraker-telegram-bot-env/lib/python3.9/site-packages/PIL/JpegImagePlugin.py", line 630, in _save
rawmode = RAWMODE[im.mode]
KeyError: 'P'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/home/klipper/moonraker-telegram-bot-env/lib/python3.9/site-packages/telegram/ext/utils/promise.py", line 96, in run
self._result = self.pooled_function(*self.args, **self.kwargs)
File "/home/klipper/moonraker-telegram-bot/bot/main.py", line 147, in status
notifier.update_status()
File "/home/klipper/moonraker-telegram-bot/bot/notifications.py", line 442, in update_status
self._schedule_notification()
File "/home/klipper/moonraker-telegram-bot/bot/notifications.py", line 334, in _schedule_notification
self._notify(mess, self._silent_progress, self._group_only)
File "/home/klipper/moonraker-telegram-bot/bot/notifications.py", line 174, in _notify
with self._cam_wrap.take_photo() as photo:
File "/home/klipper/moonraker-telegram-bot/bot/camera.py", line 42, in wrapper
result = func(self, *args, **kwargs)
File "/home/klipper/moonraker-telegram-bot/bot/camera.py", line 294, in take_photo
img.save(bio, "JPEG", quality=80, subsampling=0)
File "/home/klipper/moonraker-telegram-bot-env/lib/python3.9/site-packages/PIL/Image.py", line 2320, in save
save_handler(self, fp, filename)
File "/home/klipper/moonraker-telegram-bot-env/lib/python3.9/site-packages/PIL/JpegImagePlugin.py", line 632, in _save
raise OSError(f"cannot write mode {im.mode} as JPEG") from e
OSError: cannot write mode P as JPEG
2022-10-24 00:26:06,640 - main - ERROR - Job fdcb32ed4aa345bcb1389cec9f3cb35d raisedcannot write mode P as JPEG
Traceback (most recent call last):
File "/home/klipper/moonraker-telegram-bot-env/lib/python3.9/site-packages/PIL/JpegImagePlugin.py", line 630, in _save
rawmode = RAWMODE[im.mode]
KeyError: 'P'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/home/klipper/moonraker-telegram-bot-env/lib/python3.9/site-packages/apscheduler/executors/base.py", line 125, in run_job
retval = job.func(*job.args, **job.kwargs)
File "/home/klipper/moonraker-telegram-bot/bot/notifications.py", line 174, in _notify
with self._cam_wrap.take_photo() as photo:
File "/home/klipper/moonraker-telegram-bot/bot/camera.py", line 42, in wrapper
result = func(self, *args, **kwargs)
File "/home/klipper/moonraker-telegram-bot/bot/camera.py", line 294, in take_photo
img.save(bio, "JPEG", quality=80, subsampling=0)
File "/home/klipper/moonraker-telegram-bot-env/lib/python3.9/site-packages/PIL/Image.py", line 2320, in save
save_handler(self, fp, filename)
File "/home/klipper/moonraker-telegram-bot-env/lib/python3.9/site-packages/PIL/JpegImagePlugin.py", line 632, in _save
raise OSError(f"cannot write mode {im.mode} as JPEG") from e
OSError: cannot write mode P as JPEG
2022-10-24 00:27:44,298 - main - ERROR - Job 0f291f590dfb4567831e82fb8a1a240f raisedcannot write mode P as JPEG
Traceback (most recent call last):
File "/home/klipper/moonraker-telegram-bot-env/lib/python3.9/site-packages/PIL/JpegImagePlugin.py", line 630, in _save
rawmode = RAWMODE[im.mode]
KeyError: 'P'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/home/klipper/moonraker-telegram-bot-env/lib/python3.9/site-packages/apscheduler/executors/base.py", line 125, in run_job
retval = job.func(*job.args, **job.kwargs)
File "/home/klipper/moonraker-telegram-bot/bot/notifications.py", line 174, in _notify
with self._cam_wrap.take_photo() as photo:
File "/home/klipper/moonraker-telegram-bot/bot/camera.py", line 42, in wrapper
result = func(self, *args, **kwargs)
File "/home/klipper/moonraker-telegram-bot/bot/camera.py", line 294, in take_photo
img.save(bio, "JPEG", quality=80, subsampling=0)
File "/home/klipper/moonraker-telegram-bot-env/lib/python3.9/site-packages/PIL/Image.py", line 2320, in save
save_handler(self, fp, filename)
File "/home/klipper/moonraker-telegram-bot-env/lib/python3.9/site-packages/PIL/JpegImagePlugin.py", line 632, in _save
raise OSError(f"cannot write mode {im.mode} as JPEG") from e
OSError: cannot write mode P as JPEG
2022-10-24 00:57:05,902 - main - ERROR - Job 74a22a11f5ff4df6bcbe5ba1298e54dc raised[Errno 2] No such file or directory: '/home/klipper/moonraker-telegram-bot-timelapse/Mutter.gcode_2022-10-23_23-50/lapse.lock'
Traceback (most recent call last):
File "/home/klipper/moonraker-telegram-bot-env/lib/python3.9/site-packages/apscheduler/executors/base.py", line 125, in run_job
retval = job.func(*job.args, **job.kwargs)
File "/home/klipper/moonraker-telegram-bot/bot/timelapse.py", line 263, in _send_lapse
) = self._camera.create_timelapse(lapse_filename, gcode_name, info_mess)
File "/home/klipper/moonraker-telegram-bot/bot/camera.py", line 420, in create_timelapse
return self._create_timelapse(printing_filename, gcode_name, info_mess)
File "/home/klipper/moonraker-telegram-bot/bot/camera.py", line 455, in _create_timelapse
lock_file.touch()
File "/usr/lib/python3.9/pathlib.py", line 1304, in touch
fd = self._raw_open(flags, mode)
File "/usr/lib/python3.9/pathlib.py", line 1116, in _raw_open
return self._accessor.open(self, flags, mode)
FileNotFoundError: [Errno 2] No such file or directory: '/home/klipper/moonraker-telegram-bot-timelapse/Mutter.gcode_2022-10-23_23-50/lapse.lock'

What branch does this occur on?

master

Reports only on latest master or development branches!

  • I have updated to latest development/master version before submitting the bug
@DrDaveone DrDaveone added the bug Something isn't working label Oct 23, 2022
@aka13-404 aka13-404 added this to Unsorted bug reports in Bugs via automation Oct 26, 2022
@aka13-404 aka13-404 moved this from Unsorted bug reports to Needs more input/logs/testing in Bugs Oct 26, 2022
@nlef nlef moved this from Needs more input/logs/testing to Needs to be fixed in Bugs Oct 30, 2022
@nlef
Copy link
Owner

nlef commented Nov 13, 2022

@DrDaveone pls, check 3e149f9

@nlef nlef moved this from Needs to be fixed to In testing in Bugs Nov 13, 2022
Bugs automation moved this from In testing to Done Feb 5, 2023
@DrDaveone
Copy link
Author

issue still persist
telegram.log
tgbot is last dev
moonraker v0.7.1-809, python 3.9.2
klipper v0.11.0-62

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
Done
Development

No branches or pull requests

3 participants