i4Ds / STIXCore

STIX Core functionalities
BSD 3-Clause "New" or "Revised" License
3 stars 3 forks source link

publish tool: no timeout handling for update rid_lut #343

Closed nicHoch closed 12 months ago

nicHoch commented 1 year ago
2023-04-13T09:11:32Z INFO __main__ 499: download publish lut file: https://datacenter.stix.i4ds.net/api/bsd/info/20230401/20230501
Traceback (most recent call last):
  File "/home/stixcore/STIXCore/stixcore/processing/publish.py", line 782, in <module>
    main()
  File "/home/stixcore/STIXCore/stixcore/processing/publish.py", line 778, in main
    publish_fits_to_esa(sys.argv[1:])
  File "/home/stixcore/STIXCore/stixcore/processing/publish.py", line 525, in publish_fits_to_esa
    rid_lut = read_rid_lut(Path(args.rid_lut_file), update=args.update_rid_lut)
  File "/home/stixcore/STIXCore/stixcore/processing/publish.py", line 502, in read_rid_lut
    urllib.request.urlretrieve(update_url, updatefile)
  File "/usr/lib/python3.9/urllib/request.py", line 239, in urlretrieve
    with contextlib.closing(urlopen(url, data)) as fp:
  File "/usr/lib/python3.9/urllib/request.py", line 214, in urlopen
    return opener.open(url, data, timeout)
  File "/usr/lib/python3.9/urllib/request.py", line 523, in open
    response = meth(req, response)
  File "/usr/lib/python3.9/urllib/request.py", line 632, in http_response
    response = self.parent.error(
  File "/usr/lib/python3.9/urllib/request.py", line 561, in error
    return self._call_chain(*args)
  File "/usr/lib/python3.9/urllib/request.py", line 494, in _call_chain
    result = func(*args)
  File "/usr/lib/python3.9/urllib/request.py", line 641, in http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 504: Gateway Time-out

fix it