Объявляю channel и даю ссылку на тг канал(открытый). Строка рабочая
channel = await client.get_entity(tgLink)
Следующая строка выдает ошибку
participants = await client(GetParticipantsRequest(channel, ChannelParticipantsSearch(''), offset, limit, hash=0))
Такая ошибка
Traceback (most recent call last):
File "E:\CodesPython\fendicheckbot\env\lib\site-packages\eel\__init__.py", line 281, in _process_message
return_val = _exposed_functions[message['name']](*message['args'])
File "e:\CodesPython\fendicheckbot\main.py", line 113, in start
asyncio.run(main())
File "C:\Users\karas\AppData\Local\Programs\Python\Python39\lib\asyncio\runners.py", line 44, in run
return loop.run_until_complete(main)
File "C:\Users\karas\AppData\Local\Programs\Python\Python39\lib\asyncio\base_events.py", line 642, in run_until_complete
return future.result()
File "e:\CodesPython\fendicheckbot\main.py", line 104, in main
await asyncio.gather(telegram1())
File "e:\CodesPython\fendicheckbot\main.py", line 85, in telegram1
participants = await client(GetParticipantsRequest(channel, ChannelParticipantsSearch(''), offset, limit, hash=0))
File "E:\CodesPython\fendicheckbot\env\lib\site-packages\telethon\client\users.py", line 30, in __call__
return await self._call(self._sender, request, ordered=ordered)
File "E:\CodesPython\fendicheckbot\env\lib\site-packages\telethon\client\users.py", line 39, in _call
await r.resolve(self, utils)
File "E:\CodesPython\fendicheckbot\env\lib\site-packages\telethon\tl\functions\channels.py", line 904, in resolve
self.channel = utils.get_input_channel(await client.get_input_entity(self.channel))
File "E:\CodesPython\fendicheckbot\env\lib\site-packages\telethon\client\users.py", line 443, in get_input_entity
peer = utils.get_peer(peer)
File "E:\CodesPython\fendicheckbot\env\lib\site-packages\telethon\utils.py", line 997, in get_peer
_raise_cast_fail(peer, 'Peer')
File "E:\CodesPython\fendicheckbot\env\lib\site-packages\telethon\utils.py", line 138, in _raise_cast_fail
raise TypeError('Cannot cast {} to any kind of {}.'.format(
TypeError: Cannot cast list to any kind of Peer.
В чем ее причина и как ее исправить? Этот же кусок кода из офф документации telethon я использовал в другом проекте и в нем все в порядке