**Traceback**
I'm trying to send messages to users, but only works with the known users. I saved previously one file with different usernames, some are known and others exists but i have not contact with they. With this last ones i have problems, an exception occurs.
Why?
InputPeerUser(user_id=1911315585, access_hash=-1291217305039290110)
Traceback (most recent call last):
File "D:\Proyectos\idtelegram_sergi\mensajes_masivos.py", line 81, in <module>
client.send_message(usuario_envio, misatge , parse_mode='html')
File "D:\Programas_instalados\phyton\lib\site-packages\telethon\sync.py", line 39, in syncified
return loop.run_until_complete(coro)
File "D:\Programas_instalados\phyton\lib\asyncio\base_events.py", line 642, in run_until_complete
return future.result()
File "D:\Programas_instalados\phyton\lib\site-packages\telethon\client\messages.py", line 872, in send_message
result = await self(request)
File "D:\Programas_instalados\phyton\lib\site-packages\telethon\client\users.py", line 30, in __call__
return await self._call(self._sender, request, ordered=ordered)
File "D:\Programas_instalados\phyton\lib\site-packages\telethon\client\users.py", line 84, in _call
result = await future
telethon.errors.rpcerrorlist.PeerFloodError: Too many requests (caused by SendMessageRequest)
Checklist
pip install -U https://github.com/LonamiWebs/Telethon/archive/master.zip
and triggered the bug in the latest version.Code that causes the issue
time.sleep(3)
Abre el fichero con los Id's
fichero="D:\Proyectos\idtelegram_sergi\members_name.csv" fentrada=open(fichero,'r') usuario_old='Javivi' usuario_ultimo='Javivi'
Para cada usuario
for usuario in fentrada:
try:
fentrada.close()
...