Comments (11)
Did you try commenting out the line I told you?
Edit: Also, I'll revert this change if the suggested fix doesn't work.
from telethon.
@Lonami Could you please point me to the line that I should change? Sorry, I could forget to change it.
from telethon.
Heh this is the third time 😄
The line is the 235 on mtproto_sender.py
, under telethon/network
, that is, this one :)
from telethon.
Oops. I rewrote it during the last pull. Now I commented it out. Testing...
from telethon.
Got the following error
WARNING:root:Message ack confirmed a request
WARNING:root:Read RPC error: (RPCError(...), 'A wait of 16 seconds is required.')
Should wait 16s. Sleeping until then.
Exception in thread Updates thread:
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/threading.py", line 916, in _bootstrap_inner
self.run()
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/threading.py", line 864, in run
self._target(*self._args, **self._kwargs)
File "/development/Telethon/telethon/network/mtproto_sender.py", line 408, in updates_thread_method
self.send_ping()
File "/development/Telethon/telethon/network/mtproto_sender.py", line 84, in send_ping
self.receive(request)
File "/development/Telethon/telethon/network/mtproto_sender.py", line 138, in receive
request)
File "/development/Telethon/telethon/network/mtproto_sender.py", line 221, in process_msg
return self.handle_container(msg_id, sequence, reader, request)
File "/development/Telethon/telethon/network/mtproto_sender.py", line 281, in handle_container
if not self.process_msg(inner_msg_id, sequence, reader, request):
File "/development/Telethon/telethon/network/mtproto_sender.py", line 243, in process_msg
return self.handle_update(msg_id, sequence, reader)
File "/development/Telethon/telethon/network/mtproto_sender.py", line 256, in handle_update
handler(tlobject)
File "/development/rudevs/chats/telegram/telegram.py", line 70, in <lambda>
self.add_update_handler(lambda x: self.update_handler(x, self))
File "/development/rudevs/chats/telegram/telegram.py", line 175, in update_handler
lisntener.on_new_message(user, message, channel)
File "/development/rudevs/chats/telegram/telegram.py", line 157, in on_new_message
self.sync_telegram()
File "/development/rudevs/chats/telegram/telegram.py", line 100, in sync_telegram
self.get_content(channels, self.telegram_on_message_callback)
File "/development/rudevs/chats/telegram/telegram.py", line 62, in get_content
entity, limit=self.message_count, min_id=entity.min_id)
File "/development/Telethon/telethon/telegram_client.py", line 363, in get_message_history
add_offset=add_offset))
File "/development/Telethon/telethon/telegram_client.py", line 181, in invoke
return self.invoke(request, timeout, throw_invalid_dc, tries - 1, expect_result)
File "/development/Telethon/telethon/telegram_client.py", line 181, in invoke
return self.invoke(request, timeout, throw_invalid_dc, tries - 1, expect_result)
File "/development/Telethon/telethon/telegram_client.py", line 181, in invoke
return self.invoke(request, timeout, throw_invalid_dc, tries - 1, expect_result)
File "/development/Telethon/telethon/telegram_client.py", line 179, in invoke
raise ValueError('The result of the invoked request is always None')
ValueError: The result of the invoked request is always None
from telethon.
This time the error is clear, the main thread did go to sleep after "A wait of 16 seconds is required." was received, but the updates thread did not, I assume the server refused to reply to the ping request or replying a message update? I will add the sleep on the updates thread, revert the last change of retries and ignore the acks…
Edit: By the way @chabanovsky it would be really helpful if you managed to get --telethon-log=DEBUG
working. Can you try it with the try_telethon.py
? It's strange it's not getting passed to your program, since I use sys.argv
to manually check all the arguments passed:
from telethon.
After the last update --telethon-log=DEBUG
works for my app too. In the app I do not send anything the server. The app just listens a few channels (I'm going perform some ML/NLP tasks).
from telethon.
Did this solve after fixing #47?
from telethon.
@Lonami I have not seen this error anymore after I updated to upstream and changed code according your recommendations. It seems it was fixed.
from telethon.
It seems it was fixed.
Alright then, if you don't mind I will close this issue. Feel free to open it again if the bug reappears, or open a new issue if I introduced new bugs :P thanks for the help!
from telethon.
Thank you for the library and the help!
from telethon.
Related Issues (20)
- incorrect operation of the event.MessageEdited HOT 2
- Is there a way to get accont's login email and 2fa email? HOT 2
- Memory continues to increase HOT 4
- Download speed slow even after installing cryptg HOT 2
- Missing MessagePeerReactions from recent_reactions after running iter_messages(). HOT 2
- How to set timeout between parallel requests to Telegram servers? HOT 1
- I am got Logoff on phone after closing running file HOT 1
- inject self_bot parameter in initialization or control the DIFF_LIMIT HOT 1
- send_read_acknowledge doesn't work for megagroup HOT 1
- The button and event type "KeyboardButtonRequestChat" does not exist! HOT 2
- get_participants only return part of members in megagroup HOT 2
- how to resolve an add emoji link HOT 1
- Trying to get client's channels HOT 1
- telethon.errors.rpcerrorlist.LimitInvalidError while iter_download HOT 3
- Self destructing photo, dont download. HOT 6
- Get audio or video-only stream from videos in downloader HOT 1
- events.Raw(UpdateBotInlineSend) works after 1 HOT 2
- RPCError 400: CALL_PROTOCOL_LAYER_INVALID HOT 3
- Intermittent Message Reception Delays and Bursts in Telethon HOT 1
- Message Sending Failure with arabic symbols HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from telethon.