Nekmo / telegram-upload

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

Directories recursive does not work #37

Closed Nekmo closed 4 years ago

Nekmo commented 4 years ago

Fixed in development branch

alfredonodo commented 4 years ago

I tried the latest version 0.3.2, but it does not work if the directories nesting level is greater than 1.

Nekmo commented 4 years ago

I tried the latest version 0.3.2, but it does not work if the directories nesting level is greater than 1.

I was unable to reproduce the bug. Open an issue if the error continues.

alfredonodo commented 4 years ago

telegram-upload --directories recursive dir1 dir1->{dir2,file} dir2->{file}

Traceback (most recent call last):
  File "/usr/local/bin/telegram-upload", line 11, in <module>
    sys.exit(upload_cli())
  File "/usr/local/lib/python3.6/dist-packages/telegram_upload/exceptions.py", line 42, in wrap
    fn(*args, **kwargs)
  File "/usr/local/lib/python3.6/dist-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.6/dist-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.6/dist-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.6/dist-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python3.6/dist-packages/telegram_upload/management.py", line 42, in upload
    client.send_files(to, files, delete_on_success, print_file_id, force_file, forward, caption)
  File "/usr/local/lib/python3.6/dist-packages/telegram_upload/client.py", line 80, in send_files
    progress_callback=progress, attributes=attributes)
  File "/usr/local/lib/python3.6/dist-packages/telethon/sync.py", line 39, in syncified
    return loop.run_until_complete(coro)
  File "/usr/lib/python3.6/asyncio/base_events.py", line 484, in run_until_complete
    return future.result()
  File "/usr/local/lib/python3.6/dist-packages/telethon/client/uploads.py", line 377, in send_file
    return self._get_response_message(request, await self(request), entity)
  File "/usr/local/lib/python3.6/dist-packages/telethon/client/users.py", line 30, in __call__
    return await self._call(self._sender, request, ordered=ordered)
  File "/usr/local/lib/python3.6/dist-packages/telethon/client/users.py", line 77, in _call
    result = await future
telethon.errors.rpcerrorlist.FilePartsInvalidError: The number of file parts is invalid (caused by SendMediaRequest)

It works well with files.

Nekmo commented 4 years ago

@alfredonodo open a new issue. Thanks.