Skip to content

Fix issue #11486 - #11487

Merged
saimn merged 2 commits into
astropy:masterfrom
embray:issue-11486
Apr 6, 2021
Merged

saimn merged 2 commits into
astropy:masterfrom
embray:issue-11486

Conversation

@embray

@embray embray commented Apr 6, 2021

Copy link
Copy Markdown
Member

Fixes #11486.

As usual, FITS card parsing/verification is a mess that should be cleaned up thoroughly, but this provides a quick fix to the regression.

It is possible in certain cases for a commentary card (HISTORY or
COMMENT) to be stored in a single Card object with a value too long to
fit in a single physical FITS card.

In these cases the logical card's "image" (its physical representation)
is multiple cards concentated together, and neither the _itersubcards()
nor _split() methods handled this case properly.

For some reason these code paths were previously avoided for these long
commentary cards, but after astropy#11108 tried to reuse _split() in more
places it did not handle this case properly.
@embray embray added this to the v4.0.6 milestone Apr 6, 2021
@embray

embray commented Apr 6, 2021

Copy link
Copy Markdown
Member Author

Now to figure out how to generate a changelog entry...

@saimn saimn left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the quick fix @embray !

@saimn
saimn merged commit ba283e7 into astropy:master Apr 6, 2021
@lpsinger

lpsinger commented Apr 7, 2021

Copy link
Copy Markdown
Contributor

Will there be a v4.2.2 with this fix?

@pllim

pllim commented Apr 7, 2021

Copy link
Copy Markdown
Member

Well... We just got done with 4.2.1... I am not sure, maybe @eteq have an idea when the next one will get out.

In the meantime, are you able to do a workaround, like breaking up your very long HISTORY entry into multiple lines? I had done that myself in my work in the past, where I break it up but indent the subsequent lines, so I know they belong to the same entry.

For future reference, would be nice if you test against astropy dev downstream, so we catch such things earlier. The overhead of bug fix release on-demand so often is quite high.

@sbelkin01

Copy link
Copy Markdown

Was it completely fixed? Use the 6.0.1 version of astropy and have the same error
VerifyError: CONTINUE cards must have string values.

@pllim

pllim commented Jun 27, 2024

Copy link
Copy Markdown
Member

@sbelkin01 , please open new issue with minimum reproducible example and the affected header info. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4.0.5 / 4.2.1 : Long card images must have CONTINUE cards after the first card

5 participants