Error when trying to upload file with no duration/partial corruption
Traceback (most recent call last):
File "/usr/local/bin/telegram-upload", line 8, in
sys.exit(upload_cli())
File "/usr/local/lib/python3.10/dist-packages/telegram_upload/exceptions.py", line 68, in wrap
return fn(*args, kwargs)
File "/usr/local/lib/python3.10/dist-packages/click/core.py", line 1130, in call
return self.main(args, kwargs)
File "/usr/local/lib/python3.10/dist-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python3.10/dist-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, ctx.params)
File "/usr/local/lib/python3.10/dist-packages/click/core.py", line 760, in invoke
return __callback(args, kwargs)
File "/usr/local/lib/python3.10/dist-packages/telegram_upload/management.py", line 194, in upload
client.send_files(to, files, delete_on_success, print_file_id, forward)
File "/usr/local/lib/python3.10/dist-packages/telegram_upload/client/telegram_upload_client.py", line 126, in send_files
message = self.send_one_file(entity, file, send_as_media, thumb=thumb)
File "/usr/local/lib/python3.10/dist-packages/telegram_upload/client/telegram_upload_client.py", line 103, in send_one_file
message = self._send_file_message(entity, file, thumb, progress)
File "/usr/local/lib/python3.10/dist-packages/telegram_upload/client/telegram_upload_client.py", line 59, in _send_file_message
progress_callback=progress, attributes=file.file_attributes)
File "/usr/local/lib/python3.10/dist-packages/telegram_upload/upload_files.py", line 202, in file_attributes
return get_file_attributes(self.path)
File "/usr/local/lib/python3.10/dist-packages/telegram_upload/upload_files.py", line 64, in get_file_attributes
(0, metadata.get('duration').seconds)[metadata_has(metadata, 'duration')],
File "/usr/local/lib/python3.10/dist-packages/hachoir/metadata/metadata.py", line 81, in get
raise ValueError(
ValueError: Metadata has no value 'duration' (index 0)
pip freeze
):Description
Error when trying to upload file with no duration/partial corruption