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

io.fits: issue with long headers when new value is unicode #468

Closed
keflavich opened this issue Nov 7, 2012 · 1 comment
Closed

io.fits: issue with long headers when new value is unicode #468

keflavich opened this issue Nov 7, 2012 · 1 comment
Assignees

Comments

@keflavich
Copy link
Contributor

Assigning a long (>80char) string to a header keyword works for string values using the CONTINUE keyword with &:

newh = pyfits.PrimaryHDU()
newh.header['TEST'] = 'abcdefg' * 30

However, a warning is raised and the string is truncated if the string is unicode:

>>> newh = pyfits.PrimaryHDU()
>>> newh.header['TEST'] = u'abcdefg' * 30
WARNING: VerifyWarning: Card is too long, comment will be truncated. [pyfits.core]

This behavior is inconsistent; I believe the former is preferable.

@ghost ghost assigned embray Nov 7, 2012
@embray
Copy link
Member

embray commented Nov 7, 2012

I agree. Could you open this issue directly on PyFITS instead, as this is a PyFITS bug. It will be merged into Astropy anyways, so it should be fixed there first.

@embray embray closed this as completed Nov 7, 2012
astrofrog pushed a commit to astrofrog/astropy that referenced this issue Jun 12, 2019
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