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

Postage stamp downloader occasionally falls over with IOError - leaving objects with no RB factors #165

Open
genghisken opened this issue Jun 12, 2020 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@genghisken
Copy link
Owner

Downloading stamps occasionally falls over with the error below. This leaves batches of images with no RB factors because the summary image ID is not attached to the object, which is the last stage of the downloading process for a batch of images. Not sure if the FITS file I'm downloading from Hawaii is malformed or the download process has failed or corrupted the file somehow. Logging this here for investigation.

Traceback (most recent call last):
  File "/usr/local/swtools/python/pstc/anaconda3/envs/panstarrs/lib/python2.7/multiprocessing/process.py", line 267, in _bootstrap
    self.run()
  File "/usr/local/swtools/python/pstc/anaconda3/envs/panstarrs/lib/python2.7/multiprocessing/process.py", line 114, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/local/ps1code/gitrelease/ps1yse/code/experimental/pstamp/python/pstampGetResultsMultiprocess.py", line 39, in worker
    downloadPostageStampResults(conn, requests, PSSImageRootLocation)
  File "/usr/local/ps1code/gitrelease/ps1yse/code/experimental/pstamp/python/pstamp_get_results.py", line 168, in downloadPostageStampResults
    if downloadAllPostageStampImages(conn, requestName, PSSImageRootLocation) == 0:
  File "/usr/local/ps1code/gitrelease/ps1yse/code/experimental/pstamp/python/pstamp_get_results.py", line 129, in downloadAllPostageStampImages
    downloadStatus = downloadPostageStampImage(conn, requestName, fitsRow, dataStoreFileInfo, PSSImageRootLocation)
  File "/usr/local/ps1code/gitrelease/ps1yse/code/experimental/pstamp/python/pstamp_utils.py", line 776, in downloadPostageStampImage
    hdus = pf.open(absoluteLocalImageName)
  File "/usr/local/swtools/python/pstc/anaconda3/envs/panstarrs/lib/python2.7/site-packages/astropy/io/fits/hdu/hdulist.py", line 148, in fitsopen
    lazy_load_hdus, **kwargs)
  File "/usr/local/swtools/python/pstc/anaconda3/envs/panstarrs/lib/python2.7/site-packages/astropy/io/fits/hdu/hdulist.py", line 402, in fromfile
    lazy_load_hdus=lazy_load_hdus, **kwargs)
  File "/usr/local/swtools/python/pstc/anaconda3/envs/panstarrs/lib/python2.7/site-packages/astropy/io/fits/hdu/hdulist.py", line 1031, in _readfrom
    read_one = hdulist._read_next_hdu()
  File "/usr/local/swtools/python/pstc/anaconda3/envs/panstarrs/lib/python2.7/site-packages/astropy/io/fits/hdu/hdulist.py", line 1106, in _read_next_hdu
    hdu = _BaseHDU.readfrom(fileobj, **kwargs)
  File "/usr/local/swtools/python/pstc/anaconda3/envs/panstarrs/lib/python2.7/site-packages/astropy/io/fits/hdu/base.py", line 332, in readfrom
    **kwargs)
  File "/usr/local/swtools/python/pstc/anaconda3/envs/panstarrs/lib/python2.7/site-packages/astropy/io/fits/hdu/base.py", line 397, in _readfrom_internal
    header = Header.fromfile(data, endcard=not ignore_missing_end)
  File "/usr/local/swtools/python/pstc/anaconda3/envs/panstarrs/lib/python2.7/site-packages/astropy/io/fits/header.py", line 449, in fromfile
    padding)[1]
  File "/usr/local/swtools/python/pstc/anaconda3/envs/panstarrs/lib/python2.7/site-packages/astropy/io/fits/header.py", line 518, in _from_blocks
    raise IOError('Header missing END card.')
IOError: Header missing END card.
@genghisken genghisken added the bug Something isn't working label Jun 12, 2020
@genghisken genghisken self-assigned this Jun 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant