Nekmo / telegram-upload

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

Error On ARM (Raspberry Pi) #188

Closed a-y-a-n-das closed 1 year ago

a-y-a-n-das commented 1 year ago

Description

Describe what you were trying to get done. Tell us what happened, what went wrong, and what you expected to happen.

What I Did

I am trying to upload a file to a group chat with chat id. but end up getting a time out error and "ValueError: Cannot find any entity corresponding to "-1001973708029" " But without chat id its working fine uploading files to saved files in telegram account.

Paste the command(s) you ran and the output.
If there was a crash, please include the traceback here.

telegram-upload --to <chat id> sf.zip

Traceback (most recent call last):
  File "/usr/local/bin/telegram-upload", line 8, in <module>
    sys.exit(upload_cli())
  File "/usr/local/lib/python3.9/dist-packages/telegram_upload/exceptions.py", line 64, in wrap
    return fn(*args, **kwargs)
  File "/usr/local/lib/python3.9/dist-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.9/dist-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.9/dist-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.9/dist-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "/usr/local/lib/python3.9/dist-packages/telegram_upload/management.py", line 172, in upload
    client.send_files(to, files, delete_on_success, print_file_id, forward)
  File "/usr/local/lib/python3.9/dist-packages/telegram_upload/client.py", line 183, in send_files
    message = self._send_file_message(entity, file, thumb, progress)
  File "/usr/local/lib/python3.9/dist-packages/telegram_upload/client.py", line 133, in _send_file_message
    message = self.send_file(entity, file, thumb=thumb,
  File "/usr/local/lib/python3.9/dist-packages/telethon/sync.py", line 39, in syncified
    return loop.run_until_complete(coro)
  File "/usr/lib/python3.9/asyncio/base_events.py", line 642, in run_until_complete
    return future.result()
  File "/usr/local/lib/python3.9/dist-packages/telethon/client/uploads.py", line 356, in send_file
    entity = await self.get_input_entity(entity)
  File "/usr/local/lib/python3.9/dist-packages/telethon/client/users.py", line 432, in get_input_entity
    await self._get_entity_from_string(peer))
  File "/usr/local/lib/python3.9/dist-packages/telethon/client/users.py", line 569, in _get_entity_from_string
    raise ValueError(
ValueError: Cannot find any entity corresponding to "-1001973708029"
Nekmo commented 1 year ago

Entity by id is not supported in version v0.5.0. Version v0.6.0 supports this feature. The new version will be available shortly. Thank you.