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

weird error with big columns #327

Open
beckermr opened this issue Sep 1, 2021 · 1 comment
Open

weird error with big columns #327

beckermr opened this issue Sep 1, 2021 · 1 comment

Comments

@beckermr
Copy link
Collaborator

beckermr commented Sep 1, 2021

I cannot tell if this is a cfitsio error or something else, but here it is:

import fitsio
import numpy as np

d = np.ones(1, dtype=[("blah", "S35000")])

fitsio.write("test.fits", d, clobber=True)

produces

Traceback (most recent call last):
  File "test_fitsio_bug.py", line 6, in <module>
    fitsio.write("test.fits", d, clobber=True)
  File "/gpfs02/astro/workarea/beckermr/miniconda3/envs/des-y6a2-test2/lib/python3.8/site-packages/fitsio/fitslib.py", line 396, in write
    fits.write(
  File "/gpfs02/astro/workarea/beckermr/miniconda3/envs/des-y6a2-test2/lib/python3.8/site-packages/fitsio/fitslib.py", line 702, in write
    self.write_table(data, units=units,
  File "/gpfs02/astro/workarea/beckermr/miniconda3/envs/des-y6a2-test2/lib/python3.8/site-packages/fitsio/fitslib.py", line 1097, in write_table
    self[-1].write(data, names=names)
  File "/gpfs02/astro/workarea/beckermr/miniconda3/envs/des-y6a2-test2/lib/python3.8/site-packages/fitsio/hdu/table.py", line 278, in write
    self._FITS.write_columns(
OSError: FITSIO status = 236: column exceeds width of table
@esheldon
Copy link
Owner

esheldon commented Sep 1, 2021

If its a limit in cfitsio then we should probably just provide a better error message. This one makes it seem like there is an inconsistency in the data

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

2 participants