gateio-crypto-trading-bot-binance-announcements-new-coins icon indicating copy to clipboard operation
gateio-crypto-trading-bot-binance-announcements-new-coins copied to clipboard

Exception in thread

Open calvin200001 opened this issue 2 years ago • 8 comments

Exception in thread Thread-1: Traceback (most recent call last): File “/usr/local/lib/python3.9/site-packages/urllib3/connectionpool.py”, line 699, in urlopen httplib_response = self._make_request( File “/usr/local/lib/python3.9/site-packages/urllib3/connectionpool.py”, line 445, in _make_request six.raise_from(e, None) File “”, line 3, in raise_from File “/usr/local/lib/python3.9/site-packages/urllib3/connectionpool.py”, line 440, in _make_request httplib_response = conn.getresponse() File “/usr/local/Cellar/[email protected]/3.9.7/Frameworks/Python.framework/Versions/3.9/lib/python3.9/http/client.py”, line 1371, in getresponse response.begin() File “/usr/local/Cellar/[email protected]/3.9.7/Frameworks/Python.framework/Versions/3.9/lib/python3.9/http/client.py”, line 319, in begin version, status, reason = self._read_status() File “/usr/local/Cellar/[email protected]/3.9.7/Frameworks/Python.framework/Versions/3.9/lib/python3.9/http/client.py”, line 288, in _read_status raise RemoteDisconnected(“Remote end closed connection without” http.client.RemoteDisconnected: Remote end closed connection without response

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File “/usr/local/lib/python3.9/site-packages/requests/adapters.py”, line 439, in send resp = conn.urlopen( File “/usr/local/lib/python3.9/site-packages/urllib3/connectionpool.py”, line 755, in urlopen retries = retries.increment( File “/usr/local/lib/python3.9/site-packages/urllib3/util/retry.py”, line 532, in increment raise six.reraise(type(error), error, _stacktrace) File “/usr/local/lib/python3.9/site-packages/urllib3/packages/six.py”, line 769, in reraise raise value.with_traceback(tb) File “/usr/local/lib/python3.9/site-packages/urllib3/connectionpool.py”, line 699, in urlopen httplib_response = self._make_request( File “/usr/local/lib/python3.9/site-packages/urllib3/connectionpool.py”, line 445, in _make_request six.raise_from(e, None) File “”, line 3, in raise_from File “/usr/local/lib/python3.9/site-packages/urllib3/connectionpool.py”, line 440, in _make_request httplib_response = conn.getresponse() File “/usr/local/Cellar/[email protected]/3.9.7/Frameworks/Python.framework/Versions/3.9/lib/python3.9/http/client.py”, line 1371, in getresponse response.begin() File “/usr/local/Cellar/[email protected]/3.9.7/Frameworks/Python.framework/Versions/3.9/lib/python3.9/http/client.py”, line 319, in begin version, status, reason = self._read_status() File “/usr/local/Cellar/[email protected]/3.9.7/Frameworks/Python.framework/Versions/3.9/lib/python3.9/http/client.py”, line 288, in _read_status raise RemoteDisconnected(“Remote end closed connection without” urllib3.exceptions.ProtocolError: (‘Connection aborted.’, RemoteDisconnected(‘Remote end closed connection without response’))

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File “/usr/local/Cellar/[email protected]/3.9.7/Frameworks/Python.framework/Versions/3.9/lib/python3.9/threading.py”, line 973, in _bootstrap_inner self.run() File “/usr/local/Cellar/[email protected]/3.9.7/Frameworks/Python.framework/Versions/3.9/lib/python3.9/threading.py”, line 910, in run self._target(self._args, self._kwargs) File “/Users//Documents/gateio-crypto-trading-bot-binance-announcements-new-coins-master/new_listings_scraper.py”, line 55, in search_and_update latest_coin = get_last_coin() File “/Users/***/Documents/gateio-crypto-trading-bot-binance-announcements-new-coins-master/new_listings_scraper.py”, line 13, in get_last_coin latest_announcement = requests.get(“https://www.binance.com/bapi/composite/v1/public/cms/article/catalog/list/query?catalogId=48&pageNo=1&pageSize=15”) File “/usr/local/lib/python3.9/site-packages/requests/api.py”, line 76, in get return request(‘get’, url, params=params, **kwargs) File “/usr/local/lib/python3.9/site-packages/requests/api.py”, line 61, in request return session.request(method=method, url=url, **kwargs) File “/usr/local/lib/python3.9/site-packages/requests/sessions.py”, line 542, in request resp = self.send(prep, **send_kwargs) File “/usr/local/lib/python3.9/site-packages/requests/sessions.py”, line 655, in send r = adapter.send(request, **kwargs) File “/usr/local/lib/python3.9/site-packages/requests/adapters.py”, line 498, in send raise ConnectionError(err, request=request) requests.exceptions.ConnectionError: (‘Connection aborted.’, RemoteDisconnected(‘Remote end closed connection without response’))

calvin200001 avatar Oct 20 '21 06:10 calvin200001

Is your code altered in any way? time.sleep function in the scraper file?

CyberPunkMetalHead avatar Oct 20 '21 23:10 CyberPunkMetalHead

I don't think so. Only the TTP and TP are really high. It was running fine for a while with this:

No coins announced, or coin has already been bought/sold. Checking more frequently in case TP and SL need updating. You can comment me out, I live on line 176 in main.py Checking for coin announcements every 1 minute (in a separate thread)

but then the above code appeared and it seemed to stop checking after that. Just "no coins announced..."

calvin200001 avatar Oct 21 '21 05:10 calvin200001

now i just got this about lazio and doesnt seem to work now. New annoucement detected: LAZIO Traceback (most recent call last): File "/usr/local/lib/python3.9/site-packages/gate_api/api_client.py", line 190, in __call_api response_data = self.request( File "/usr/local/lib/python3.9/site-packages/gate_api/api_client.py", line 447, in request return self.rest_client.GET( File "/usr/local/lib/python3.9/site-packages/gate_api/rest.py", line 237, in GET return self.request( File "/usr/local/lib/python3.9/site-packages/gate_api/rest.py", line 232, in request raise ApiException(http_resp=r) gate_api.exceptions.ApiException: (400) Reason: Bad Request HTTP response headers: HTTPHeaderDict({'Date': 'Thu, 21 Oct 2021 06:01:07 GMT', 'Content-Type': 'application/json', 'Content-Length': '63', 'Connection': 'keep-alive', 'Server': 'openresty', 'X-Request-Id': '[c94110ea-711366782]'}) HTTP response body: {"label":"INVALID_CURRENCY","message":"Invalid currency LAZIO"}

calvin200001 avatar Oct 21 '21 08:10 calvin200001

LAZIO is not listed on gate.io

davidebonavita avatar Oct 21 '21 09:10 davidebonavita

I added 'Subscription' word to exclusions in new_listings_scraper.py file, and delate new_listing file and now it's working correctly. [](ur Снимок экрана 2021-10-21 в 12 17 19 l)

yermakovant7 avatar Oct 21 '21 09:10 yermakovant7

I think when checking the announcement, you need to add the phrase "Will List". If this is in the announcement, only then make a request to buy a coin at the gate

yermakovant7 avatar Oct 21 '21 09:10 yermakovant7

I think when checking the announcement, you need to add the phrase "Will List". If this is in the announcement, only then make a request to buy a coin at the gate

Yes Indeed this is also a fix to the problem

yasinzaii avatar Oct 22 '21 12:10 yasinzaii

Can this issue be closed?

Linus045 avatar Dec 28 '21 17:12 Linus045