Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upload inside specific topic group not supported #191

Closed
arkaroy14 opened this issue May 28, 2023 · 2 comments
Closed

Upload inside specific topic group not supported #191

arkaroy14 opened this issue May 28, 2023 · 2 comments

Comments

@arkaroy14
Copy link

Description

i am trying to upload in telegram group where there is many topics, but i want to upload directly to specific topic.

What I Did

CODE:

telegram-upload --to @xyz/2 filename

ERROR:

Traceback (most recent call last):
  File "/usr/local/bin/telegram-upload", line 8, in <module>
    sys.exit(upload_cli())
  File "/usr/local/lib/python3.10/dist-packages/telegram_upload/exceptions.py", line 64, 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 172, 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.py", line 183, in send_files
    message = self._send_file_message(entity, file, thumb, progress)
  File "/usr/local/lib/python3.10/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.10/dist-packages/telethon/sync.py", line 39, in syncified
    return loop.run_until_complete(coro)
  File "/usr/lib/python3.10/asyncio/base_events.py", line 649, in run_until_complete
    return future.result()
  File "/usr/local/lib/python3.10/dist-packages/telethon/client/uploads.py", line 356, in send_file
    entity = await self.get_input_entity(entity)
  File "/usr/local/lib/python3.10/dist-packages/telethon/client/users.py", line 432, in get_input_entity
    await self._get_entity_from_string(peer))
  File "/usr/local/lib/python3.10/dist-packages/telethon/client/users.py", line 569, in _get_entity_from_string
    raise ValueError(
ValueError: Cannot find any entity corresponding to "@xyz/2"
@Nekmo
Copy link
Owner

Nekmo commented Jun 14, 2023

Please read the documentation for supported entity naming methods. If you continue to have problems, open a new issue:
https://docs.nekmo.org/telegram-upload/usage.html#set-recipient-or-sender

Thanks.

@Nekmo Nekmo closed this as completed Jun 14, 2023
@Nideapum
Copy link

I think this Issue is similar to #245
It's de same error "ValueError: Cannot find any entity corresponding to"
Telethon can't find the chat via URL with topic or private groups.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants