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

Data Load Error does not mention which file is in error #1096

Closed
pllim opened this issue Aug 23, 2016 · 1 comment · Fixed by #1104
Closed

Data Load Error does not mention which file is in error #1096

pllim opened this issue Aug 23, 2016 · 1 comment · Fixed by #1104
Labels

Comments

@pllim
Copy link
Contributor

pllim commented Aug 23, 2016

When I use File -> Open Data Set, select a bunch of files (some are bad), leave "Files of type" as "Auto", and click "Open", I get a "Data Load Error" message box (see below). However, it does not tell me which file is in error.

Error message: Header missing END card.

Traceback (most recent call last):
  File ".../glue/dialogs/data_wizard/qt/data_wizard_dialog.py", line 36, in data_wizard
    result = gdd.load_data()
  File ".../glue/dialogs/data_wizard/qt/data_wizard_dialog.py", line 105, in load_data
    d = load_data(path, factory=fac.function)
  File ".../glue/core/data_factories/helpers.py", line 237, in load_data
    d = as_list(factory(path, **kwargs))
  File ".../glue/core/data_factories/helpers.py", line 330, in auto_data
    return fac(filename, *args, **kwargs)
  File ".../glue/core/data_factories/astropy_table.py", line 99, in astropy_tabular_data_fits
    return astropy_tabular_data(*args, **kwargs)
  File ".../glue/core/data_factories/astropy_table.py", line 66, in astropy_tabular_data
    table = astropy_table_read(*args, **kwargs)
  File ".../glue/core/data_factories/astropy_table.py", line 49, in astropy_table_read
    return Table.read(*args, **kwargs)
  File ".../astropy/table/table.py", line 2332, in read
    return io_registry.read(cls, *args, **kwargs)
  File ".../astropy/io/registry.py", line 351, in read
    data = reader(*args, **kwargs)
  File ".../astropy/io/fits/connect.py", line 135, in read_table_fits
    hdulist = fits_open(input)
  File ".../astropy/io/fits/hdu/hdulist.py", line 139, in fitsopen
    return HDUList.fromfile(name, mode, memmap, save_backup, cache, **kwargs)
  File ".../astropy/io/fits/hdu/hdulist.py", line 281, in fromfile
    save_backup=save_backup, cache=cache, **kwargs)
  File ".../astropy/io/fits/hdu/hdulist.py", line 839, in _readfrom
    hdu = _BaseHDU.readfrom(ffo, **kwargs)
  File ".../astropy/io/fits/hdu/base.py", line 423, in readfrom
    **kwargs)
  File ".../astropy/io/fits/hdu/base.py", line 483, in _readfrom_internal
    header = Header.fromfile(data, endcard=not ignore_missing_end)
  File ".../astropy/io/fits/header.py", line 451, in fromfile
    padding)[1]
  File ".../astropy/io/fits/header.py", line 520, in _from_blocks
    raise IOError('Header missing END card.')
OSError: Header missing END card.
@pllim
Copy link
Contributor Author

pllim commented Aug 24, 2016

See potential fix in #1104.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants