Nekmo / telegram-upload

Upload and download files from Telegram up to 4 GiB using your account
MIT License
1.05k stars 226 forks source link

"TypeError: __init__() got an unexpected keyword argument 'reply_to_msg_id'" in command - "telegram-upload --directories "recursive" --album" #215

Closed saptarshi-7 closed 1 year ago

saptarshi-7 commented 1 year ago

Description

Trying to upload 3 images from the directory D:\tgAlbumUp\UploadEngine - P\demoVlog as given in the screenshot I have done this earlier without any problem, However suddenly with a reinstallation of python and telegram-upload it starts to produce following error and the upload does not work despite the successful upload outputs.

PS C:\Windows\system32> telegram-upload  --directories "recursive" --album 'D:\tgAlbumUp\UploadEngine - P\demoVlog'
Uploading "20230422.jpg"  [####################################]  100%
Uploading "20230507.jpg"  [####################################]  100%
Uploading "20230522.jpg"  [####################################]  100%
Traceback (most recent call last):
  File "~~~\python\python38\lib\runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "~~~\python\python38\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "~~~\Python\Python38\Scripts\telegram-upload.exe\__main__.py", line 7, in <mo
dule>
  File "~~~\python\python38\lib\site-packages\telegram_upload\exceptions.py", line 6
8, in wrap
    return fn(*args, **kwargs)
  File "~~~\python\python38\lib\site-packages\click\core.py", line 1157, in __call__

    return self.main(*args, **kwargs)
  File "~~~\python\python38\lib\site-packages\click\core.py", line 1078, in main
    rv = self.invoke(ctx)
  File "~~~\python\python38\lib\site-packages\click\core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "~~~\python\python38\lib\site-packages\click\core.py", line 783, in invoke
    return __callback(*args, **kwargs)
  File "~~~\python\python38\lib\site-packages\telegram_upload\management.py", line 1
89, in upload
    client.send_files_as_album(to, files, delete_on_success, print_file_id, forward)
  File "~~~\python\python38\lib\site-packages\telegram_upload\client\telegram_upload
_client.py", line 54, in send_files_as_album
    async_to_sync(self._send_album_media(entity, media))
  File "~~~\python\python38\lib\site-packages\telegram_upload\utils.py", line 48, in
 async_to_sync
    return loop.run_until_complete(coro)
  File "~~~\python\python38\lib\asyncio\base_events.py", line 616, in run_until_comp
lete
    return future.result()
  File "~~~\python\python38\lib\site-packages\telegram_upload\client\telegram_upload
_client.py", line 41, in _send_album_media
    request = functions.messages.SendMultiMediaRequest(
TypeError: __init__() got an unexpected keyword argument 'reply_to_msg_id'

This example has 3 jpeg files in the directory and we see all are uploaded successfully in the above command line. However for more jpeg files in the directory it doesn't uploads all of them and returns the error in any instance..

The single file upload seems to work fine

What I Did

Tried different versions of python (compatible with windows7, as I am on the OS - Win7)
Looks like some exception is there at __init__()
Doesn't have much developement expertise in python.

Kindly help to get this sorted in my current hardware and OS setup. TIA!

Nekmo commented 1 year ago

This looks like a bug in Telegram-upload. It will be investigated and resolved quickly. Thank you!

Nekmo commented 1 year ago

This is a problem after the latests update in Telethon. This will be fixed in a patch version. Thanks!

Nekmo commented 1 year ago

Fixed in v0.7.1.