Skip to content
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

Script crashes in case of a single airport download issue. #1

Closed
k-popov opened this issue Mar 21, 2015 · 1 comment
Closed

Script crashes in case of a single airport download issue. #1

k-popov opened this issue Mar 21, 2015 · 1 comment

Comments

@k-popov
Copy link
Owner

k-popov commented Mar 21, 2015

All download fails if a single airport can't be downloaded:

INFO:root:[29910/34766] 18TE is being processed
INFO:root:Getting APT data for 18TE
INFO:root:Getting scenery for 8344
INFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (1): gateway.x-plane.com
Traceback (most recent call last):
  File "apt_fetcher.py", line 208, in <module>
    main()
  File "apt_fetcher.py", line 191, in main
    apt_data = get_airport_apt(scenery)
  File "apt_fetcher.py", line 41, in get_airport_apt
    scenery_json = get_json_from_api(scenery_request)
  File "apt_fetcher.py", line 17, in get_json_from_api
    reply = requests.get(api_request)
  File "/home/hub/fg_tools/local/lib/python2.7/site-packages/requests/api.py", line 68, in get
    return request('get', url, **kwargs)
  File "/home/hub/fg_tools/local/lib/python2.7/site-packages/requests/api.py", line 50, in request
    response = session.request(method=method, url=url, **kwargs)
  File "/home/hub/fg_tools/local/lib/python2.7/site-packages/requests/sessions.py", line 464, in request
    resp = self.send(prep, **send_kwargs)
  File "/home/hub/fg_tools/local/lib/python2.7/site-packages/requests/sessions.py", line 576, in send
    r = adapter.send(request, **kwargs)
  File "/home/hub/fg_tools/local/lib/python2.7/site-packages/requests/adapters.py", line 415, in send
    raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', error(110, 'Connection timed out'))

We need to have retries but if download of this exact file fails after all retries, skip it leaving some kind of special log message.

@k-popov
Copy link
Owner Author

k-popov commented Mar 21, 2015

Implemented in 42b017c

@k-popov k-popov closed this as completed Mar 21, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant