EarthScope / rover

ROVER: robust data access tool for FDSN data centers
https://earthscope.github.io/rover/
Other
10 stars 1 forks source link

CRITICAL in log_file_contents(): IOError: [Errno 2] No such file or directory #80

Closed chad-earthscope closed 5 years ago

chad-earthscope commented 5 years ago

When a download fails for any reason before anything is received, an attempt is made to log the contents of the file. When the file does not exist an exception is thrown, stack trace below.

ERROR    2019-03-06 16:51:42,795: HTTPConnectionPool(host='service.iris.edu', port=80): Max retries exceeded with url: /fdsnws/dataselect/1/query (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x3319d50>: Failed to establish a new connection: [Errno -2] Name or service not known',))
ERROR    2019-03-06 16:51:42,795: Will log response contents (max 10 lines) here:
CRITICAL 2019-03-06 16:51:42,796: Traceback (most recent call last):
  File "/opt/devops/py2/lib/python2.7/site-packages/rover/__init__.py", line 106, in main
    execute(config.command, config)
  File "/opt/devops/py2/lib/python2.7/site-packages/rover/__init__.py", line 85, in execute
    commands[command][0](config).run(config.args)
  File "/opt/devops/py2/lib/python2.7/site-packages/rover/download.py", line 127, in run
    if self._do_download(get, url, in_path, out_path):  # False when no data available
  File "/opt/devops/py2/lib/python2.7/site-packages/rover/download.py", line 161, in _do_download
    diagnose_error(self._log, str(e), in_path, out_path, copied=False)
  File "/opt/devops/py2/lib/python2.7/site-packages/rover/utils.py", line 549, in diagnose_error
    log_file_contents(response, log, 10)
  File "/opt/devops/py2/lib/python2.7/site-packages/rover/utils.py", line 565, in log_file_contents
    with open(path, 'r') as input:
IOError: [Errno 2] No such file or directory: '/opt/devops/datarepo/tmp/rover_download_e90df9_9413'
chad-earthscope commented 5 years ago

Fixed in 4f8203f7267ea67280151c7df07e618d2339545f