-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Telegram Broken #5891
Comments
I got an similar error, but it was about epoll. But I think it's the same
error...
Op 27 jan. 2017 20:26 schreef "MerlionRock" <[email protected]>:
Errors occur with telegram with new installation. Assuming some package
errors but not able to fins out which one.
Here's the error:
Traceback (most recent call last):
File "pokecli.py", line 865, in
main()
File "pokecli.py", line 202, in main
formatted='Starting bot...'
File "/Users/***/PokemonGo-Bot/pokemongo_bot/event_manager.py", line 77, in
emit
handler.handle_event(event, sender, level, formatted_msg, data)
File "/Users/***/PokemonGo-Bot/pokemongo_bot/event_handlers/telegram_handler.py",
line 579, in handle_event
self.tbot.sendMessage(chat_id=uid, parse_mode='Markdown', text=msg)
File "/Users/***/PokemonGo-Bot/pokemongo_bot/event_handlers/telegram_handler.py",
line 123, in sendMessage
self._tbot.sendMessage(chat_id=chat_id, parse_mode=parse_mode, text=text)
File "/Users/***/PokemonGo-Bot/lib/python2.7/site-packages/telegram/bot.py",
line 125, in decorator
result = func(self,
*args, kwargs) File
"/Users/*/PokemonGo-Bot/lib/python2.7/site-packages/telegram/bot.py",
line 151, in decorator
result = self._request.post(url, data, timeout=kwargs.get('timeout'))
File "/Users/***/PokemonGo-Bot/lib/python2.7/site-packages/telegram/utils/request.py",
line 207, in post
*urlopen_kwargs) File
"/Users/**/PokemonGo-Bot/lib/python2.7/site-packages/telegram/utils/request.py",
line 132, in _request_wrapper
resp = self._con_pool.request(
*args, kwargs) File
"/Users/*/PokemonGo-Bot/lib/python2.7/site-packages/urllib3/request.py",
line 70, in request
*urlopen_kw) File
"/Users/**/PokemonGo-Bot/lib/python2.7/site-packages/urllib3/request.py",
line 148, in request_encode_body
return self.urlopen(method, url,
*extra_kw) File
"/Users/**/PokemonGo-Bot/lib/python2.7/site-packages/urllib3/poolmanager.py",
line 244, in urlopen
response = conn.urlopen(method, u.request_uri,
*kw) File "/Users/**/PokemonGo-Bot/lib/python2.7/site-packages/urllib3/connectionpool.py",
line 588, in urlopen
conn = self._get_conn(timeout=pool_timeout)
File "/Users/***/PokemonGo-Bot/lib/python2.7/site-packages/urllib3/connectionpool.py",
line 241, in _get_conn
if conn and is_connection_dropped(conn):
File "/Users/***/PokemonGo-Bot/lib/python2.7/site-packages/urllib3/util/connection.py",
line 27, in is_connection_dropped
return bool(wait_for_read(sock, timeout=0.0))
File "/Users/***/PokemonGo-Bot/lib/python2.7/site-packages/urllib3/util/wait.py",
line 33, in wait_for_read
return _wait_for_io_events(socks, EVENT_READ, timeout)
File "/Users/***/PokemonGo-Bot/lib/python2.7/site-packages/urllib3/util/wait.py",
line 22, in _wait_for_io_events
with DefaultSelector() as selector:
File "/Users/***/PokemonGo-Bot/lib/python2.7/site-packages/urllib3/util/selectors.py",
line 431, in *init*
self._kqueue = select.kqueue()
AttributeError: 'module' object has no attribute 'kqueue'
Anyone has the same problem?
The bot seems to work fine when telegram is disabled.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#5891>, or mute the
thread
<https://github.com/notifications/unsubscribe-auth/AAD5Y3PAoIKs_r43uJU9k1q38A8LnsVbks5rWkTWgaJpZM4LwH1j>
.
|
@davidakachaos I guess same error. Mac uses kqueue, other OS uses epoll. |
Ah, yes. I'm on Linux (Ubuntu)
Op 27 jan. 2017 20:39 schreef "MerlionRock" <[email protected]>:
… @davidakachaos <https://github.com/davidakachaos> I guess same error. Mac
uses kqueue, other OS uses epoll.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#5891 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAD5Yzo40UcEc3JiGeLvH1Kj5w4tJWTdks5rWkf2gaJpZM4LwH1j>
.
|
Anyone found any solution yet? I have no idea what causes it. |
No, I've searched Google but haven't found a solution yet. I updated the Telegram bot dependency to 5.3.0 but that didn't help. So the search continues.... |
@MerlionRock The issue lies with version 1.20 of urllib3. Add the following line to requirements.txt:
Then run
And the telegram bot will function again. |
@ashleykleynhans Thank you so much! Finally! Will do a PR for this for those who are facing the same problem. |
@MerlionRock I opened a PR for it #5895 |
Errors occur with telegram with new installation. Assuming some package errors but not able to fins out which one.
Here's the error:
Traceback (most recent call last):
File "pokecli.py", line 865, in
main()
File "pokecli.py", line 202, in main
formatted='Starting bot...'
File "/Users//PokemonGo-Bot/pokemongo_bot/event_manager.py", line 77, in emit
handler.handle_event(event, sender, level, formatted_msg, data)
File "/Users//PokemonGo-Bot/pokemongo_bot/event_handlers/telegram_handler.py", line 579, in handle_event
self.tbot.sendMessage(chat_id=uid, parse_mode='Markdown', text=msg)
File "/Users//PokemonGo-Bot/pokemongo_bot/event_handlers/telegram_handler.py", line 123, in sendMessage
self._tbot.sendMessage(chat_id=chat_id, parse_mode=parse_mode, text=text)
File "/Users//PokemonGo-Bot/lib/python2.7/site-packages/telegram/bot.py", line 125, in decorator
result = func(self, args, kwargs)
File "/Users//PokemonGo-Bot/lib/python2.7/site-packages/telegram/bot.py", line 151, in decorator
result = self._request.post(url, data, timeout=kwargs.get('timeout'))
File "/Users//PokemonGo-Bot/lib/python2.7/site-packages/telegram/utils/request.py", line 207, in post
urlopen_kwargs)
File "/Users//PokemonGo-Bot/lib/python2.7/site-packages/telegram/utils/request.py", line 132, in _request_wrapper
resp = self._con_pool.request(args, kwargs)
File "/Users//PokemonGo-Bot/lib/python2.7/site-packages/urllib3/request.py", line 70, in request
urlopen_kw)
File "/Users//PokemonGo-Bot/lib/python2.7/site-packages/urllib3/request.py", line 148, in request_encode_body
return self.urlopen(method, url, extra_kw)
File "/Users//PokemonGo-Bot/lib/python2.7/site-packages/urllib3/poolmanager.py", line 244, in urlopen
response = conn.urlopen(method, u.request_uri, kw)
File "/Users//PokemonGo-Bot/lib/python2.7/site-packages/urllib3/connectionpool.py", line 588, in urlopen
conn = self._get_conn(timeout=pool_timeout)
File "/Users//PokemonGo-Bot/lib/python2.7/site-packages/urllib3/connectionpool.py", line 241, in _get_conn
if conn and is_connection_dropped(conn):
File "/Users//PokemonGo-Bot/lib/python2.7/site-packages/urllib3/util/connection.py", line 27, in is_connection_dropped
return bool(wait_for_read(sock, timeout=0.0))
File "/Users//PokemonGo-Bot/lib/python2.7/site-packages/urllib3/util/wait.py", line 33, in wait_for_read
return _wait_for_io_events(socks, EVENT_READ, timeout)
File "/Users//PokemonGo-Bot/lib/python2.7/site-packages/urllib3/util/wait.py", line 22, in _wait_for_io_events
with DefaultSelector() as selector:
File "/Users/**/PokemonGo-Bot/lib/python2.7/site-packages/urllib3/util/selectors.py", line 431, in init
self._kqueue = select.kqueue()
AttributeError: 'module' object has no attribute 'kqueue'
Anyone has the same problem?
The bot seems to work fine when telegram is disabled.
The text was updated successfully, but these errors were encountered: