Closed wzooroo closed 11 months ago
Hello,
Во первых - 2023-11-15 08:06:43,114 - [620][INFO] - main - (main.py).firstStart(131) - Login or Password is wrong. Please configurate environment
Have you tried to set a login and password (dedicated account) in Surveillance station user management ? You can create one here with viewer only privilege.
Во вторых - 2023-11-15 08:06:43,589 - [623][INFO] - main - (main.py).(175) - Not Found Syno config, need create что это?
You need to set your Synology local IP address during the Docker configuration. Check here : https://github.com/samoswall/Synology-Surveillance-Station-video-to-Telegram-with-prerecording/blob/main/README.en.md#A4
Во первых - 2023-11-15 08:06:43,114 - [620][INFO] - main - (main.py).firstStart(131) - Login or Password is wrong. Please configurate environment хотя пароль верный.
Убедитесь, что пользователь имеет права доступа к DSM и Surveillance Station (Панель управления - Пользователь и группа - (выбрать пользователя) Редактировать - Приложения) стоят галки на Разрешено Если Вы используете двухфакторную авторизацию, Вы должны успеть за 60 секунд ввести действующий код, сохранить конфигурацию контейнера и его запустить.
Во вторых - 2023-11-15 08:06:43,589 - [623][INFO] - main - (main.py).(175) - Not Found Syno config, need create что это?
Приложению в контейнере необходимо создать конфигурацию (Названия и количество камер в SS ), а также получить токен доступа (требование API SS). Без авторизации в SS конфигурацию создать невозможно. Конфигурация создается в папке, которую Вы подключили в Synology. Она должна иметь права на запись (в настройке контейнера)
Ну и в третьих - 99% жрет процессор((((
У вас не запущено приложение, исходя из предыдущих ответов, контейнер находится в ошибочном состоянии.
Убедитесь, что пользователь имеет права доступа к DSM и Surveillance Station (Панель управления - Пользователь и группа - (выбрать пользователя) Редактировать - Приложения) стоят галки на Разрешено
В этом все было дело! В описании настройке этого не было( Спасибо!
Не стабильно работает((( Даже очень! Не с того не с сего начинает тупить( Часть кода ошибки.
`
2023/12/07 23:06:53 | stdout | telebot.apihelper.ApiTelegramException: A request to the Telegram API was unsuccessful. Error code: 400. Description: Bad Request: file must be non-empty |
---|---|---|
2023/12/07 23:06:53 | stdout | raise ApiTelegramException(method_name, result, result_json) |
2023/12/07 23:06:53 | stdout | File "/opt/venv/lib/python3.12/site-packages/telebot/apihelper.py", line 189, in _check_result |
2023/12/07 23:06:53 | stdout | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
2023/12/07 23:06:53 | stdout | json_result = _check_result(method_name, result) |
2023/12/07 23:06:53 | stdout | File "/opt/venv/lib/python3.12/site-packages/telebot/apihelper.py", line 162, in _make_request |
2023/12/07 23:06:53 | stdout | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
2023/12/07 23:06:53 | stdout | return _make_request(token, method_url, params=payload, files=files, method='post') |
2023/12/07 23:06:53 | stdout | File "/opt/venv/lib/python3.12/site-packages/telebot/apihelper.py", line 719, in send_video |
2023/12/07 23:06:53 | stdout | apihelper.send_video( |
2023/12/07 23:06:53 | stdout | File "/opt/venv/lib/python3.12/site-packages/telebot/init.py", line 2288, in send_video |
2023/12/07 23:06:53 | stdout | tg_bot.send_video(chat_id, video, None, None, None, None, mycaption) |
2023/12/07 23:06:53 | stdout | File "/app/main.py", line 104, in send_camvideo |
2023/12/07 23:06:53 | stdout | send_camvideo('/bot/'+str(camid) +''+str(last_video_id)+'.mp4',cam_id, str(last_video_id)+' offset: ' + str(video_offset)) |
2023/12/07 23:06:53 | stdout | File "/app/main.py", line 246, in webhookcam |
2023/12/07 23:06:53 | stdout | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
2023/12/07 23:06:53 | stdout | return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) |
2023/12/07 23:06:53 | stdout | File "/opt/venv/lib/python3.12/site-packages/flask/app.py", line 852, in dispatch_request |
2023/12/07 23:06:53 | stdout | ^^^^^^^^^^^^^^^^^^^^^^^ |
2023/12/07 23:06:53 | stdout | rv = self.dispatch_request() |
2023/12/07 23:06:53 | stdout | File "/opt/venv/lib/python3.12/site-packages/flask/app.py", line 867, in full_dispatch_request |
2023/12/07 23:06:53 | stdout | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
2023/12/07 23:06:53 | stdout | rv = self.handle_user_exception(e) |
2023/12/07 23:06:53 | stdout | File "/opt/venv/lib/python3.12/site-packages/flask/app.py", line 869, in full_dispatch_request |
2023/12/07 23:06:53 | stdout | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
2023/12/07 23:06:53 | stdout | response = self.full_dispatch_request() |
2023/12/07 23:06:53 | stdout | File "/opt/venv/lib/python3.12/site-packages/flask/app.py", line 1455, in wsgi_app |
2023/12/07 23:06:53 | stdout | Traceback (most recent call last): |
2023/12/07 23:06:53 | stdout | 2023-12-07 19:06:53,106 - [7][ERROR] - main - (app.py).log_exception(825) - Exception on /webhookcam [POST] |
2023/12/07 23:06:42 | stdout | 2023-12-07 19:06:42,661 - [7][INFO] - main - (main.py).webhookcam(230) - Received IDCam: 1, 07.12.2023, 19:06:42 |
2023/12/07 23:06:42 | stdout | 2023-12-07 19:06:42,661 - [7][INFO] - main - (main.py).webhookcam(228) - New request {'idcam': '1'} |
2023/12/07 22:21:56 | stdout | requests.exceptions.ChunkedEncodingError: ('Connection broken: IncompleteRead(4616038 bytes read, 301 more expected)', IncompleteRead(4616038 bytes read, 301 more expected)) |
2023/12/07 22:21:56 | stdout | raise ChunkedEncodingError(e) |
2023/12/07 22:21:56 | stdout | File "/opt/venv/lib/python3.12/site-packages/requests/models.py", line 818, in generate |
2023/12/07 22:21:56 | stdout | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
2023/12/07 22:21:56 | stdout | self._content = b"".join(self.iter_content(CONTENT_CHUNK_SIZE)) or b"" |
2023/12/07 22:21:56 | stdout | File "/opt/venv/lib/python3.12/site-packages/requests/models.py", line 899, in content |
2023/12/07 22:21:56 | stdout | r.content |
2023/12/07 22:21:56 | stdout | File "/opt/venv/lib/python3.12/site-packages/requests/sessions.py", line 747, in send |
2023/12/07 22:21:56 | stdout | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
2023/12/07 22:21:56 | stdout | resp = self.send(prep, **send_kwargs) |
2023/12/07 22:21:56 | stdout | File "/opt/venv/lib/python3.12/site-packages/requests/sessions.py", line 589, in request |
2023/12/07 22:21:56 | stdout | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
2023/12/07 22:21:56 | stdout | return session.request(method=method, url=url, **kwargs) |
2023/12/07 22:21:56 | stdout | File "/opt/venv/lib/python3.12/site-packages/requests/api.py", line 59, in request |
2023/12/07 22:21:56 | stdout | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
2023/12/07 22:21:56 | stdout | return request("get", url, params=params, **kwargs) |
2023/12/07 22:21:56 | stdout | File "/opt/venv/lib/python3.12/site-packages/requests/api.py", line 73, in get |
2023/12/07 22:21:56 | stdout | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
2023/12/07 22:21:56 | stdout | download = requests.get(syno_url + '/temp.mp4', |
2023/12/07 22:21:56 | stdout | File "/app/main.py", line 208, in get_last_video |
2023/12/07 22:21:56 | stdout | get_last_video(cam_id, last_video_id, video_offset) |
2023/12/07 22:21:56 | stdout | File "/app/main.py", line 245, in webhookcam |
2023/12/07 22:21:56 | stdout | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
2023/12/07 22:21:56 | stdout | return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) |
2023/12/07 22:21:56 | stdout | File "/opt/venv/lib/python3.12/site-packages/flask/app.py", line 852, in dispatch_request |
2023/12/07 22:21:56 | stdout | ^^^^^^^^^^^^^^^^^^^^^^^ |
2023/12/07 22:21:56 | stdout | rv = self.dispatch_request() |
2023/12/07 22:21:56 | stdout | File "/opt/venv/lib/python3.12/site-packages/flask/app.py", line 867, in full_dispatch_request |
2023/12/07 22:21:56 | stdout | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
2023/12/07 22:21:56 | stdout | rv = self.handle_user_exception(e) |
2023/12/07 22:21:56 | stdout | File "/opt/venv/lib/python3.12/site-packages/flask/app.py", line 869, in full_dispatch_request |
2023/12/07 22:21:56 | stdout | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
2023/12/07 22:21:56 | stdout | response = self.full_dispatch_request() |
2023/12/07 22:21:56 | stdout | File "/opt/venv/lib/python3.12/site-packages/flask/app.py", line 1455, in wsgi_app |
2023/12/07 22:21:56 | stdout | Traceback (most recent call last): |
2023/12/07 22:21:56 | stdout | |
2023/12/07 22:21:56 | stdout | During handling of the above exception, another exception occurred: |
2023/12/07 22:21:56 | stdout | |
2023/12/07 22:21:56 | stdout | urllib3.exceptions.ProtocolError: ('Connection broken: IncompleteRead(4616038 bytes read, 301 more expected)', IncompleteRead(4616038 bytes read, 301 more expected)) |
2023/12/07 22:21:56 | stdout | raise ProtocolError(f"Connection broken: {e!r}", e) from e |
2023/12/07 22:21:56 | stdout | File "/opt/venv/lib/python3.12/site-packages/urllib3/response.py", line 727, in _error_catcher |
2023/12/07 22:21:56 | stdout | self.gen.throw(value) |
2023/12/07 22:21:56 | stdout | File "/usr/local/lib/python3.12/contextlib.py", line 155, in exit |
2023/12/07 22:21:56 | stdout | with self._error_catcher(): |
2023/12/07 22:21:56 | stdout | File "/opt/venv/lib/python3.12/site-packages/urllib3/response.py", line 813, in _raw_read |
2023/12/07 22:21:56 | stdout | ^^^^^^^^^^^^^^^^^^^ |
2023/12/07 22:21:56 | stdout | data = self._raw_read(amt) |
2023/12/07 22:21:56 | stdout | File "/opt/venv/lib/python3.12/site-packages/urllib3/response.py", line 907, in read |
2023/12/07 22:21:56 | stdout | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
2023/12/07 22:21:56 | stdout | data = self.read(amt=amt, decode_content=decode_content) |
2023/12/07 22:21:56 | stdout | File "/opt/venv/lib/python3.12/site-packages/urllib3/response.py", line 936, in stream |
2023/12/07 22:21:56 | stdout | yield from self.raw.stream(chunk_size, decode_content=True) |
2023/12/07 22:21:56 | stdout | File "/opt/venv/lib/python3.12/site-packages/requests/models.py", line 816, in generate |
2023/12/07 22:21:56 | stdout | Traceback (most recent call last): |
2023/12/07 22:21:56 | stdout | |
2023/12/07 22:21:56 | stdout | The above exception was the direct cause of the following exception: |
2023/12/07 22:21:56 | stdout | |
2023/12/07 22:21:56 | stdout | urllib3.exceptions.IncompleteRead: IncompleteRead(4616038 bytes read, 301 more expected) |
2023/12/07 22:21:56 | stdout | raise IncompleteRead(self._fp_bytes_read, self.length_remaining) |
2023/12/07 22:21:56 | stdout | File "/opt/venv/lib/python3.12/site-packages/urllib3/response.py", line 835, in _raw_read |
2023/12/07 22:21:56 | stdout | yield |
2023/12/07 22:21:56 | stdout | File "/opt/venv/lib/python3.12/site-packages/urllib3/response.py", line 710, in _error_catcher |
2023/12/07 22:21:56 | stdout | Traceback (most recent call last): |
2023/12/07 22:21:56 | stdout | 2023-12-07 18:21:56,893 - [8][ERROR] - main - (app.py).log_exception(825) - Exception on /webhookcam [POST] |
2023/12/07 22:21:48 | stdout | 2023-12-07 18:21:48,700 - [8][INFO] - main - (main.py).webhookcam(230) - Received IDCam: 1, 07.12.2023, 18:21:48 |
2023/12/07 22:21:48 | stdout | 2023-12-07 18:21:48,700 - [8][INFO] - main - (main.py).webhookcam(228) - New request {'idcam': '1'} |
2023/12/07 21:59:38 | stdout | telebot.apihelper.ApiTelegramException: A request to the Telegram API was unsuccessful. Error code: 400. Description: Bad Request: file must be non-empty |
2023/12/07 21:59:38 | stdout | raise ApiTelegramException(method_name, result, result_json) |
2023/12/07 21:59:38 | stdout | File "/opt/venv/lib/python3.12/site-packages/telebot/apihelper.py", line 189, in _check_result |
2023/12/07 21:59:38 | stdout | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
2023/12/07 21:59:38 | stdout | json_result = _check_result(method_name, result) |
2023/12/07 21:59:38 | stdout | File "/opt/venv/lib/python3.12/site-packages/telebot/apihelper.py", line 162, in _make_request |
2023/12/07 21:59:38 | stdout | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
2023/12/07 21:59:38 | stdout | return _make_request(token, method_url, params=payload, files=files, method='post') |
2023/12/07 21:59:38 | stdout | File "/opt/venv/lib/python3.12/site-packages/telebot/apihelper.py", line 719, in send_video |
2023/12/07 21:59:38 | stdout | apihelper.send_video( |
2023/12/07 21:59:38 | stdout | File "/opt/venv/lib/python3.12/site-packages/telebot/init.py", line 2288, in send_video |
2023/12/07 21:59:38 | stdout | tg_bot.send_video(chat_id, video, None, None, None, None, mycaption) |
2023/12/07 21:59:38 | stdout | File "/app/main.py", line 104, in send_camvideo |
2023/12/07 21:59:38 | stdout | send_camvideo('/bot/'+str(camid) +''+str(last_video_id)+'.mp4',cam_id, str(last_video_id)+' offset: ' + str(video_offset)) |
2023/12/07 21:59:38 | stdout | File "/app/main.py", line 246, in webhookcam |
2023/12/07 21:59:38 | stdout | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
2023/12/07 21:59:38 | stdout | return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) |
2023/12/07 21:59:38 | stdout | File "/opt/venv/lib/python3.12/site-packages/flask/app.py", line 852, in dispatch_request |
2023/12/07 21:59:38 | stdout | ^^^^^^^^^^^^^^^^^^^^^^^ |
2023/12/07 21:59:38 | stdout | rv = self.dispatch_request() |
2023/12/07 21:59:38 | stdout | File "/opt/venv/lib/python3.12/site-packages/flask/app.py", line 867, in full_dispatch_request |
2023/12/07 21:59:38 | stdout | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
2023/12/07 21:59:38 | stdout | rv = self.handle_user_exception(e) |
2023/12/07 21:59:38 | stdout | File "/opt/venv/lib/python3.12/site-packages/flask/app.py", line 869, in full_dispatch_request |
2023/12/07 21:59:38 | stdout | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
2023/12/07 21:59:38 | stdout | response = self.full_dispatch_request() |
2023/12/07 21:59:38 | stdout | File "/opt/venv/lib/python3.12/site-packages/flask/app.py", line 1455, in wsgi_app |
2023/12/07 21:59:38 | stdout | Traceback (most recent call last): |
2023/12/07 21:59:38 | stdout | 2023-12-07 17:59:38,469 - [10][ERROR] - main - (app.py).log_exception(825) - Exception on /webhookcam [POST] |
2023/12/07 21:59:29 | stdout | 2023-12-07 17:59:29,693 - [10][INFO] - main - (main.py).webhookcam(230) - Received IDCam: 1, 07.12.2023, 17:59:29 |
2023/12/07 21:59:29 | stdout | 2023-12-07 17:59:29,693 - [10][INFO] - main - (main.py).webhookcam(228) - New request {'idcam': '1'} |
2023/12/07 21:57:36 | stdout | requests.exceptions.ChunkedEncodingError: ('Connection broken: IncompleteRead(4616022 bytes read, 317 more expected)', IncompleteRead(4616022 bytes read, 317 more expected)) |
2023/12/07 21:57:36 | stdout | raise ChunkedEncodingError(e) |
2023/12/07 21:57:36 | stdout | File "/opt/venv/lib/python3.12/site-packages/requests/models.py", line 818, in generate |
2023/12/07 21:57:36 | stdout | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
2023/12/07 21:57:36 | stdout | self._content = b"".join(self.iter_content(CONTENT_CHUNK_SIZE)) or b"" |
2023/12/07 21:57:36 | stdout | File "/opt/venv/lib/python3.12/site-packages/requests/models.py", line 899, in content |
2023/12/07 21:57:36 | stdout | r.content |
2023/12/07 21:57:36 | stdout | File "/opt/venv/lib/python3.12/site-packages/requests/sessions.py", line 747, in send |
2023/12/07 21:57:36 | stdout | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
2023/12/07 21:57:36 | stdout | resp = self.send(prep, **send_kwargs) |
2023/12/07 21:57:36 | stdout | File "/opt/venv/lib/python3.12/site-packages/requests/sessions.py", line 589, in request |
2023/12/07 21:57:36 | stdout | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
2023/12/07 21:57:36 | stdout | return session.request(method=method, url=url, **kwargs) |
2023/12/07 21:57:36 | stdout | File "/opt/venv/lib/python3.12/site-packages/requests/api.py", line 59, in request |
2023/12/07 21:57:36 | stdout | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
2023/12/07 21:57:36 | stdout | return request("get", url, params=params, **kwargs) |
2023/12/07 21:57:36 | stdout | File "/opt/venv/lib/python3.12/site-packages/requests/api.py", line 73, in get |
2023/12/07 21:57:36 | stdout | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
2023/12/07 21:57:36 | stdout | download = requests.get(syno_url + '/temp.mp4', |
2023/12/07 21:57:36 | stdout | File "/app/main.py", line 208, in get_last_video |
2023/12/07 21:57:36 | stdout | get_last_video(cam_id, last_video_id, video_offset) |
2023/12/07 21:57:36 | stdout | File "/app/main.py", line 245, in webhookcam |
2023/12/07 21:57:36 | stdout | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
2023/12/07 21:57:36 | stdout | return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) |
2023/12/07 21:57:36 | stdout | File "/opt/venv/lib/python3.12/site-packages/flask/app.py", line 852, in dispatch_request |
2023/12/07 21:57:36 | stdout | ^^^^^^^^^^^^^^^^^^^^^^^ |
2023/12/07 21:57:36 | stdout | rv = self.dispatch_request() |
2023/12/07 21:57:36 | stdout | File "/opt/venv/lib/python3.12/site-packages/flask/app.py", line 867, in full_dispatch_request |
2023/12/07 21:57:36 | stdout | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
2023/12/07 21:57:36 | stdout | rv = self.handle_user_exception(e) |
2023/12/07 21:57:36 | stdout | File "/opt/venv/lib/python3.12/site-packages/flask/app.py", line 869, in full_dispatch_request |
2023/12/07 21:57:36 | stdout | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
2023/12/07 21:57:36 | stdout | response = self.full_dispatch_request() |
2023/12/07 21:57:36 | stdout | File "/opt/venv/lib/python3.12/site-packages/flask/app.py", line 1455, in wsgi_app |
2023/12/07 21:57:36 | stdout | Traceback (most recent call last): |
2023/12/07 21:57:36 | stdout | |
2023/12/07 21:57:36 | stdout | During handling of the above exception, another exception occurred: |
2023/12/07 21:57:36 | stdout | |
2023/12/07 21:57:36 | stdout | urllib3.exceptions.ProtocolError: ('Connection broken: IncompleteRead(4616022 bytes read, 317 more expected)', IncompleteRead(4616022 bytes read, 317 more expected)) |
2023/12/07 21:57:36 | stdout | raise ProtocolError(f"Connection broken: {e!r}", e) from e |
2023/12/07 21:57:36 | stdout | File "/opt/venv/lib/python3.12/site-packages/urllib3/response.py", line 727, in _error_catcher |
2023/12/07 21:57:36 | stdout | self.gen.throw(value) |
2023/12/07 21:57:36 | stdout | File "/usr/local/lib/python3.12/contextlib.py", line 155, in exit |
2023/12/07 21:57:36 | stdout | with self._error_catcher(): |
2023/12/07 21:57:36 | stdout | File "/opt/venv/lib/python3.12/site-packages/urllib3/response.py", line 813, in _raw_read |
2023/12/07 21:57:36 | stdout | ^^^^^^^^^^^^^^^^^^^ |
2023/12/07 21:57:36 | stdout | data = self._raw_read(amt) |
2023/12/07 21:57:36 | stdout | File "/opt/venv/lib/python3.12/site-packages/urllib3/response.py", line 907, in read |
2023/12/07 21:57:36 | stdout | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
2023/12/07 21:57:36 | stdout | data = self.read(amt=amt, decode_content=decode_content) |
2023/12/07 21:57:36 | stdout | File "/opt/venv/lib/python3.12/site-packages/urllib3/response.py", line 936, in stream |
2023/12/07 21:57:36 | stdout | yield from self.raw.stream(chunk_size, decode_content=True) |
2023/12/07 21:57:36 | stdout | File "/opt/venv/lib/python3.12/site-packages/requests/models.py", line 816, in generate |
2023/12/07 21:57:36 | stdout | Traceback (most recent call last): |
2023/12/07 21:57:36 | stdout | |
2023/12/07 21:57:36 | stdout | The above exception was the direct cause of the following exception: |
2023/12/07 21:57:36 | stdout | |
2023/12/07 21:57:36 | stdout | urllib3.exceptions.IncompleteRead: IncompleteRead(4616022 bytes read, 317 more expected) |
2023/12/07 21:57:36 | stdout | raise IncompleteRead(self._fp_bytes_read, self.length_remaining) |
2023/12/07 21:57:36 | stdout | File "/opt/venv/lib/python3.12/site-packages/urllib3/response.py", line 835, in _raw_read |
2023/12/07 21:57:36 | stdout | yield |
2023/12/07 21:57:36 | stdout | File "/opt/venv/lib/python3.12/site-packages/urllib3/response.py", line 710, in _error_catcher |
2023/12/07 21:57:36 | stdout | Traceback (most recent call last): |
2023/12/07 21:57:36 | stdout | 2023-12-07 17:57:36,836 - [7][ERROR] - main - (app.py).log_exception(825) - Exception on /webhookcam [POST] |
2023/12/07 21:57:28 | stdout | 2023-12-07 17:57:28,580 - [7][INFO] - main - (main.py).webhookcam(230) - Received IDCam: 1, 07.12.2023, 17:57:28 |
2023/12/07 21:57:28 | stdout | 2023-12-07 17:57:28,580 - [7][INFO] - main - (main.py).webhookcam(228) - New request {'idcam': '1'} |
2023/12/07 19:22:31 | stdout | requests.exceptions.ChunkedEncodingError: ('Connection broken: IncompleteRead(5766364 bytes read, 305 more expected)', IncompleteRead(5766364 bytes read, 305 more expected)) |
2023/12/07 19:22:31 | stdout | raise ChunkedEncodingError(e) |
2023/12/07 19:22:31 | stdout | File "/opt/venv/lib/python3.12/site-packages/requests/models.py", line 818, in generate |
2023/12/07 19:22:31 | stdout | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
2023/12/07 19:22:31 | stdout | self._content = b"".join(self.iter_content(CONTENT_CHUNK_SIZE)) or b"" |
2023/12/07 19:22:31 | stdout | File "/opt/venv/lib/python3.12/site-packages/requests/models.py", line 899, in content |
2023/12/07 19:22:31 | stdout | r.content |
2023/12/07 19:22:31 | stdout | File "/opt/venv/lib/python3.12/site-packages/requests/sessions.py", line 747, in send |
2023/12/07 19:22:31 | stdout | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
2023/12/07 19:22:31 | stdout | resp = self.send(prep, **send_kwargs) |
2023/12/07 19:22:31 | stdout | File "/opt/venv/lib/python3.12/site-packages/requests/sessions.py", line 589, in request |
2023/12/07 19:22:31 | stdout | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
2023/12/07 19:22:31 | stdout | return session.request(method=method, url=url, **kwargs) |
2023/12/07 19:22:31 | stdout | File "/opt/venv/lib/python3.12/site-packages/requests/api.py", line 59, in request |
2023/12/07 19:22:31 | stdout | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
2023/12/07 19:22:31 | stdout | return request("get", url, params=params, **kwargs) |
2023/12/07 19:22:31 | stdout | File "/opt/venv/lib/python3.12/site-packages/requests/api.py", line 73, in get |
2023/12/07 19:22:31 | stdout | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
2023/12/07 19:22:31 | stdout | download = requests.get(syno_url + '/temp.mp4', |
2023/12/07 19:22:31 | stdout | File "/app/main.py", line 208, in get_last_video |
2023/12/07 19:22:31 | stdout | get_last_video(cam_id, last_video_id, video_offset) |
2023/12/07 19:22:31 | stdout | File "/app/main.py", line 245, in webhookcam |
2023/12/07 19:22:31 | stdout | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
2023/12/07 19:22:31 | stdout | return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) |
2023/12/07 19:22:31 | stdout | File "/opt/venv/lib/python3.12/site-packages/flask/app.py", line 852, in dispatch_request |
2023/12/07 19:22:31 | stdout | ^^^^^^^^^^^^^^^^^^^^^^^ |
2023/12/07 19:22:31 | stdout | rv = self.dispatch_request() |
2023/12/07 19:22:31 | stdout | File "/opt/venv/lib/python3.12/site-packages/flask/app.py", line 867, in full_dispatch_request |
2023/12/07 19:22:31 | stdout | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
2023/12/07 19:22:31 | stdout | rv = self.handle_user_exception(e) |
2023/12/07 19:22:31 | stdout | File "/opt/venv/lib/python3.12/site-packages/flask/app.py", line 869, in full_dispatch_request |
2023/12/07 19:22:31 | stdout | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
2023/12/07 19:22:31 | stdout | response = self.full_dispatch_request() |
2023/12/07 19:22:31 | stdout | File "/opt/venv/lib/python3.12/site-packages/flask/app.py", line 1455, in wsgi_app |
2023/12/07 19:22:31 | stdout | Traceback (most recent call last): |
2023/12/07 19:22:31 | stdout | |
2023/12/07 19:22:31 | stdout | During handling of the above exception, another exception occurred: |
2023/12/07 19:22:31 | stdout | |
2023/12/07 19:22:31 | stdout | urllib3.exceptions.ProtocolError: ('Connection broken: IncompleteRead(5766364 bytes read, 305 more expected)', IncompleteRead(5766364 bytes read, 305 more expected)) |
2023/12/07 19:22:31 | stdout | raise ProtocolError(f"Connection broken: {e!r}", e) from e |
2023/12/07 19:22:31 | stdout | File "/opt/venv/lib/python3.12/site-packages/urllib3/response.py", line 727, in _error_catcher |
2023/12/07 19:22:31 | stdout | self.gen.throw(value) |
2023/12/07 19:22:31 | stdout | File "/usr/local/lib/python3.12/contextlib.py", line 155, in exit |
2023/12/07 19:22:31 | stdout | with self._error_catcher(): |
2023/12/07 19:22:31 | stdout | File "/opt/venv/lib/python3.12/site-packages/urllib3/response.py", line 813, in _raw_read |
2023/12/07 19:22:31 | stdout | ^^^^^^^^^^^^^^^^^^^ |
2023/12/07 19:22:31 | stdout | data = self._raw_read(amt) |
2023/12/07 19:22:31 | stdout | File "/opt/venv/lib/python3.12/site-packages/urllib3/response.py", line 907, in read |
2023/12/07 19:22:31 | stdout | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
2023/12/07 19:22:31 | stdout | data = self.read(amt=amt, decode_content=decode_content) |
2023/12/07 19:22:31 | stdout | File "/opt/venv/lib/python3.12/site-packages/urllib3/response.py", line 936, in stream |
2023/12/07 19:22:31 | stdout | yield from self.raw.stream(chunk_size, decode_content=True) |
2023/12/07 19:22:31 | stdout | File "/opt/venv/lib/python3.12/site-packages/requests/models.py", line 816, in generate |
2023/12/07 19:22:31 | stdout | Traceback (most recent call last): |
2023/12/07 19:22:31 | stdout | |
2023/12/07 19:22:31 | stdout | The above exception was the direct cause of the following exception: |
2023/12/07 19:22:31 | stdout | |
2023/12/07 19:22:31 | stdout | urllib3.exceptions.IncompleteRead: IncompleteRead(5766364 bytes read, 305 more expected) |
2023/12/07 19:22:31 | stdout | raise IncompleteRead(self._fp_bytes_read, self.length_remaining) |
2023/12/07 19:22:31 | stdout | File "/opt/venv/lib/python3.12/site-packages/urllib3/response.py", line 835, in _raw_read |
2023/12/07 19:22:31 | stdout | yield |
2023/12/07 19:22:31 | stdout | File "/opt/venv/lib/python3.12/site-packages/urllib3/response.py", line 710, in _error_catcher |
2023/12/07 19:22:31 | stdout | Traceback (most recent call last): |
2023/12/07 19:22:31 | stdout | 2023-12-07 15:22:31,547 - [10][ERROR] - main - (app.py).log_exception(825) - Exception on /webhookcam [POST] |
2023/12/07 19:22:20 | stdout | 2023-12-07 15:22:20,609 - [10][INFO] - main - (main.py).webhookcam(230) - Received IDCam: 1, 07.12.2023, 15:22:20 |
2023/12/07 19:22:20 | stdout | 2023-12-07 15:22:20,609 - [10][INFO] - main - (main.py).webhookcam(228) - New request {'idcam': '1'} |
2023/12/07 19:22:19 | stdout | telebot.apihelper.ApiTelegramException: A request to the Telegram API was unsuccessful. Error code: 400. Description: Bad Request: file must be non-empty |
2023/12/07 19:22:19 | stdout | raise ApiTelegramException(method_name, result, result_json) |
2023/12/07 19:22:19 | stdout | File "/opt/venv/lib/python3.12/site-packages/telebot/apihelper.py", line 189, in _check_result |
`
После получения webhook скрипт производит авторизацию и следующим шагом, спустя 5 секунд, скачивает файл видео длительностью 5сек предзапись + 5сек ожидания. Ваш Synology на этапе авторизации отказывает в ней (сбрасывает соединение, не отвечает) К сожалению повторить эту проблему у меня не получается. Мой Synology мне всегда отвечает на API запрос. Возможно Ваш Synology чем-то занят (нагружен), и отклоняет запросы (или не отвечает в установленные сроки). Подобная ситуация ни где не описана, чтобы посоветовать Вам решение проблемы. Проблемы с сетью не рассматриваем, надеясь на правильную ее работу, к тому же она виртуальная и скорость ее работы зависит от предоставляемых ресурсов Synology для работы контейнеров.
Жаль конечно( У меня на двух разных по моделям такое происходит( Ресурсов много, занятость меньше 30%( Главное может и заработать и опять в ступор( Вообще не понимаю причину и закономерность. У всех Synology по одной камере и они нормально пишут, без всяких проблем( Придется оставаться только на уведомлениях Телеграмма(
Разобрался в чем причина отвала была. Были включены уведомления на Телеграмм на тот же бот. Удалил эти уведомления и оставил только эти и все перестало падать. Все работает но только не всегда приходят видео( Уведомление есть, а видео нет( И очень очень часто не присылает(
Проверьте, когда видео не пришло, а есть ли в примонтированной папке (где конфиг сохраняется) файл с последним видео? Если там последний файл, то значит он с Synology SS скачан, но не отправлен в Telegram.
Вот что там https://postimg.cc/gw9CyrVZ На телеграмм в 09:56 пришло только уведомление. В самой SS видео это есть, а в каталоге /docker/bot только нулевого размера файл.
Во первых - 2023-11-15 08:06:43,114 - [620][INFO] - main - (main.py).firstStart(131) - Login or Password is wrong. Please configurate environment
хотя пароль верный.
Во вторых - 2023-11-15 08:06:43,589 - [623][INFO] - main - (main.py).(175) - Not Found Syno config, need create
что это?
Ну и в третьих - 99% жрет процессор((((