the tool works fine but when "--caption" is used it Crashes.
What I Did
Any command with (--caption) in it will crash.
telegram-upload --caption {file.name} --to "********" --force-file "File.ext "File2.ext"
Traceback (most recent call last): File "<frozen runpy>", line 198, in _run_module_as_main File "<frozen runpy>", line 88, in _run_code File "C:\Users\sd\AppData\Roaming\Python\Python312\Scripts\telegram-upload.exe\__main__.py", line 7, in <module> File "C:\Users\sd\AppData\Roaming\Python\Python312\site-packages\telegram_upload\exceptions.py", line 68, in wrap return fn(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^ File "C:\Users\sd\AppData\Roaming\Python\Python312\site-packages\click\core.py", line 1157, in __call__ return self.main(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\sd\AppData\Roaming\Python\Python312\site-packages\click\core.py", line 1078, in main rv = self.invoke(ctx) ^^^^^^^^^^^^^^^^ File "C:\Users\sd\AppData\Roaming\Python\Python312\site-packages\click\core.py", line 1434, in invoke return ctx.invoke(self.callback, **ctx.params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\sd\AppData\Roaming\Python\Python312\site-packages\click\core.py", line 783, in invoke return __callback(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\sd\AppData\Roaming\Python\Python312\site-packages\telegram_upload\management.py", line 191, in upload client.send_files(to, files, delete_on_success, print_file_id, forward) File "C:\Users\sd\AppData\Roaming\Python\Python312\site-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 "C:\Users\sd\AppData\Roaming\Python\Python312\site-packages\telegram_upload\client\telegram_upload_client.py", line 103, in send_one_file message = self._send_file_message(entity, file, thumb, progress) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\sd\AppData\Roaming\Python\Python312\site-packages\telegram_upload\client\telegram_upload_client.py", line 58, in _send_file_message caption=file.file_caption, force_document=file.force_file, ^^^^^^^^^^^^^^^^^ File "C:\Users\sd\AppData\Roaming\Python\Python312\site-packages\telegram_upload\upload_files.py", line 177, in file_caption caption = formatter.format(self._caption, file=FilePath(self.path), now=datetime.datetime.now()) ^^^^^^^^^^^^^^^^^^^ File "C:\Users\sd\AppData\Roaming\Python\Python312\site-packages\telegram_upload\caption_formatter.py", line 303, in __new__ self = cls._from_parts(args) ^^^^^^^^^^^^^^^ AttributeError: type object 'WindowsFilePath' has no attribute '_from_parts'. Did you mean: '_load_parts'?
Description
the tool works fine but when "--caption" is used it Crashes.
What I Did
Traceback (most recent call last): File "<frozen runpy>", line 198, in _run_module_as_main File "<frozen runpy>", line 88, in _run_code File "C:\Users\sd\AppData\Roaming\Python\Python312\Scripts\telegram-upload.exe\__main__.py", line 7, in <module> File "C:\Users\sd\AppData\Roaming\Python\Python312\site-packages\telegram_upload\exceptions.py", line 68, in wrap return fn(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^ File "C:\Users\sd\AppData\Roaming\Python\Python312\site-packages\click\core.py", line 1157, in __call__ return self.main(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\sd\AppData\Roaming\Python\Python312\site-packages\click\core.py", line 1078, in main rv = self.invoke(ctx) ^^^^^^^^^^^^^^^^ File "C:\Users\sd\AppData\Roaming\Python\Python312\site-packages\click\core.py", line 1434, in invoke return ctx.invoke(self.callback, **ctx.params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\sd\AppData\Roaming\Python\Python312\site-packages\click\core.py", line 783, in invoke return __callback(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\sd\AppData\Roaming\Python\Python312\site-packages\telegram_upload\management.py", line 191, in upload client.send_files(to, files, delete_on_success, print_file_id, forward) File "C:\Users\sd\AppData\Roaming\Python\Python312\site-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 "C:\Users\sd\AppData\Roaming\Python\Python312\site-packages\telegram_upload\client\telegram_upload_client.py", line 103, in send_one_file message = self._send_file_message(entity, file, thumb, progress) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\sd\AppData\Roaming\Python\Python312\site-packages\telegram_upload\client\telegram_upload_client.py", line 58, in _send_file_message caption=file.file_caption, force_document=file.force_file, ^^^^^^^^^^^^^^^^^ File "C:\Users\sd\AppData\Roaming\Python\Python312\site-packages\telegram_upload\upload_files.py", line 177, in file_caption caption = formatter.format(self._caption, file=FilePath(self.path), now=datetime.datetime.now()) ^^^^^^^^^^^^^^^^^^^ File "C:\Users\sd\AppData\Roaming\Python\Python312\site-packages\telegram_upload\caption_formatter.py", line 303, in __new__ self = cls._from_parts(args) ^^^^^^^^^^^^^^^ AttributeError: type object 'WindowsFilePath' has no attribute '_from_parts'. Did you mean: '_load_parts'?