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

datamodels warning Error validating header for HDU #0 #5995

Closed
stscijgbot-jp opened this issue Apr 28, 2021 · 4 comments
Closed

datamodels warning Error validating header for HDU #0 #5995

stscijgbot-jp opened this issue Apr 28, 2021 · 4 comments

Comments

@stscijgbot-jp
Copy link
Collaborator

stscijgbot-jp commented Apr 28, 2021

Issue JP-2062 was created on JIRA by James Davies [X]:

With astropy 4.2.1, we are seeing a bunch of the following warnings in our unit tests:

/Users/jdavies/miniconda3/envs/test/lib/python3.9/site-packages/astropy/io/fits/hdu/hdulist.py:1187: VerifyWarning: Error validating header for HDU #0 (note: Astropy uses zero-based indexing).
      Header size is not multiple of 2880: 188
  There may be extra bytes after the last HDU or the file is corrupted.

To reproduce with a single unit test (there are dozens of others):

$ pytest jwst/stpipe/tests/test_step.py::test_hook_with_return
============================= test session starts =============================
platform darwin -- Python 3.9.4, pytest-6.2.2, py-1.10.0, pluggy-0.13.1
crds_context: jwst_0717.pmap
rootdir: /Users/jdavies/dev/jwst, configfile: setup.cfg
plugins: requests-mock-1.8.0, cov-2.11.1, ci-watson-0.5, asdf-2.7.3, openfiles-0.5.0, doctestplus-0.9.0
collected 1 item                                                              

jwst/stpipe/tests/test_step.py .                                        [100%]

============================== warnings summary ===============================
jwst/stpipe/tests/test_step.py::test_hook_with_return
  /Users/jdavies/miniconda3/envs/test/lib/python3.9/site-packages/astropy/io/fits/hdu/hdulist.py:1187: VerifyWarning: Error validating header for HDU #0 (note: Astropy uses zero-based indexing).
      Header size is not multiple of 2880: 188
  There may be extra bytes after the last HDU or the file is corrupted.
    warnings.warn(

-- Docs: https://docs.pytest.org/en/stable/warnings.html
======================== 1 passed, 1 warning in 1.53s =========================
@jdavies-st
Copy link
Collaborator

More details on this here

asdf-format/asdf#977

@nden
Copy link
Collaborator

nden commented Jun 22, 2021

Most likely we need to regenerate the test file.

@hbushouse
Copy link
Collaborator

Can't reproduce the problem using the latest astropy and asdf, so I'm closing.

@stscijgbot-jp
Copy link
Collaborator Author

Comment by Howard Bushouse on JIRA:

Just ran these tests (and many more) using asdf=2.9.2 and astropy=5.0 and did not get any of these warnings. So either the test files have already been updated or it's no longer an issue with these later versions of the dependencies. So I'm closing this ticket.

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

No branches or pull requests

4 participants