Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

During updater bootstrap phase, retry on network errors #605

Milestone
@gloomy-ghost

Description

@gloomy-ghost

Steps to reproduce

  1. Start bot by usingtelegram.ext.updater.start_polling()
  2. Wait for network errors

Expected behaviour

There should be some retry mechanism before stopping the whole bot

Actual behaviour

The bot stopped on network errors

Configuration

Ubuntu 16.04.2 LTS

Version of Python, python-telegram-bot & dependencies:
python-telegram-bot 5.3.1
urllib3 1.20
certifi 2017.04.17
future 0.16.0
Python 3.6.1 (default, Apr 22 2017, 20:17:23) [GCC 5.4.0 20160609]

Logs
2017-05-1315:13:40,243-telegram.ext.updater-ERROR-unhandledexceptionTraceback (mostrecentcalllast):File"/home/ghost/.local/lib/python3.6/site-packages/urllib3/connectionpool.py",line386,in_make_requestsix.raise_from(e,None)File"<string>",line2,inraise_fromFile"/home/ghost/.local/lib/python3.6/site-packages/urllib3/connectionpool.py",line382,in_make_requesthttplib_response=conn.getresponse()File"/usr/lib/python3.6/http/client.py",line1331,ingetresponseresponse.begin()File"/usr/lib/python3.6/http/client.py",line297,inbeginversion,status,reason=self._read_status()File"/usr/lib/python3.6/http/client.py",line258,in_read_statusline=str(self.fp.readline(_MAXLINE+1),"iso-8859-1")File"/usr/lib/python3.6/socket.py",line586,inreadintoreturnself._sock.recv_into(b)File"/usr/lib/python3.6/ssl.py",line1002,inrecv_intoreturnself.read(nbytes,buffer)File"/usr/lib/python3.6/ssl.py",line865,inreadreturnself._sslobj.read(len,buffer)File"/usr/lib/python3.6/ssl.py",line625,inreadv=self._sslobj.read(len,buffer)socket.timeout:ThereadoperationtimedoutDuringhandlingoftheaboveexception,anotherexceptionoccurred:Traceback (mostrecentcalllast):File"/home/ghost/.local/lib/python3.6/site-packages/telegram/ext/updater.py",line115,in_thread_wrappertarget(*args,**kwargs)File"/home/ghost/.local/lib/python3.6/site-packages/telegram/ext/updater.py",line233,in_start_pollingself.last_update_id,timeout=timeout,network_delay=network_delay)File"/home/ghost/.local/lib/python3.6/site-packages/telegram/bot.py",line125,indecoratorresult=func(self,*args,**kwargs)File"/home/ghost/.local/lib/python3.6/site-packages/telegram/bot.py",line1241,ingetUpdatesresult=self._request.post(url,data,timeout=urlopen_timeout)File"/home/ghost/.local/lib/python3.6/site-packages/telegram/utils/request.py",line207,inpost**urlopen_kwargs)File"/home/ghost/.local/lib/python3.6/site-packages/telegram/utils/request.py",line132,in_request_wrapperresp=self._con_pool.request(*args,**kwargs)File"/home/ghost/.local/lib/python3.6/site-packages/urllib3/request.py",line70,inrequest**urlopen_kw)File"/home/ghost/.local/lib/python3.6/site-packages/urllib3/request.py",line148,inrequest_encode_bodyreturnself.urlopen(method,url,**extra_kw)File"/home/ghost/.local/lib/python3.6/site-packages/urllib3/poolmanager.py",line244,inurlopenresponse=conn.urlopen(method,u.request_uri,**kw)File"/home/ghost/.local/lib/python3.6/site-packages/urllib3/connectionpool.py",line649,inurlopen_stacktrace=sys.exc_info()[2])File"/home/ghost/.local/lib/python3.6/site-packages/urllib3/util/retry.py",line347,inincrementraisesix.reraise(type(error),error,_stacktrace)File"/home/ghost/.local/lib/python3.6/site-packages/urllib3/packages/six.py",line686,inreraiseraisevalueFile"/home/ghost/.local/lib/python3.6/site-packages/urllib3/connectionpool.py",line600,inurlopenchunked=chunked)File"/home/ghost/.local/lib/python3.6/site-packages/urllib3/connectionpool.py",line388,in_make_requestself._raise_timeout(err=e,url=url,timeout_value=read_timeout)File"/home/ghost/.local/lib/python3.6/site-packages/urllib3/connectionpool.py",line308,in_raise_timeoutraiseReadTimeoutError(self,url,"Read timed out. (read timeout=%s)"%timeout_value)urllib3.exceptions.ReadTimeoutError:HTTPSConnectionPool(host='api.telegram.org',port=443):Readtimedout. (readtimeout=15.0)2017-05-1315:13:41,195-telegram.ext.dispatcher-CRITICAL-stoppingduetoexceptioninanotherthread

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp