question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. ItΒ collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot import IERS data (due to regression in Numpy 1.15.3?) (SOLVED: Use 1.15.2 or wait for 1.15.4)

See original GitHub issue

I cannot load the IERS data using the latest version of Numpy. This is due to a change or possibly a regression in Numpy 1.15.13.

The test consists of the following Python code:

from astropy.utils.iers import IERS_Auto
IERS_Auto.open()

It works with numpy==1.15.2:

$ docker run --rm -it python:slim bash -c 'pip install astropy numpy==1.15.2 && python -c "from astropy.utils.iers import IERS_Auto; IERS_Auto.open()"'
Collecting astropy
  Downloading https://files.pythonhosted.org/packages/5a/c6/5e823cb1b0a55eb0ab5da32553916867f7cd7349df98b517ba6f19c86edc/astropy-3.0.5-cp37-cp37m-manylinux1_x86_64.whl (6.0MB)
    100% |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 6.0MB 5.4MB/s 
Collecting numpy==1.15.2
  Downloading https://files.pythonhosted.org/packages/98/44/94cc2e139b611b16458384ff3b9c87f217144b5915b0a9798c07a7295437/numpy-1.15.2-cp37-cp37m-manylinux1_x86_64.whl (13.8MB)
    100% |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 13.9MB 1.7MB/s 
Installing collected packages: numpy, astropy
Successfully installed astropy-3.0.5 numpy-1.15.2
Downloading http://maia.usno.navy.mil/ser7/finals2000A.all
|==========================================| 3.2M/3.2M (100.00%)         2s

But it fails with numpy==1.15.3:

$ docker run --rm -it python:slim bash -c 'pip install astropy numpy==1.15.3 && python -c "from astropy.utils.iers import IERS_Auto; IERS_Auto.open()"'
Collecting astropy
  Downloading https://files.pythonhosted.org/packages/5a/c6/5e823cb1b0a55eb0ab5da32553916867f7cd7349df98b517ba6f19c86edc/astropy-3.0.5-cp37-cp37m-manylinux1_x86_64.whl (6.0MB)
    100% |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 6.0MB 4.1MB/s 
Collecting numpy==1.15.3
  Downloading https://files.pythonhosted.org/packages/f2/1f/a05544224706463a1c28589db5900247c7e85a077a0d254e7db012fbb008/numpy-1.15.3-cp37-cp37m-manylinux1_x86_64.whl (13.8MB)
    100% |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 13.9MB 1.8MB/s 
Installing collected packages: numpy, astropy
Successfully installed astropy-3.0.5 numpy-1.15.3
Downloading http://maia.usno.navy.mil/ser7/finals2000A.all
|==========================================| 3.2M/3.2M (100.00%)         1s
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/local/lib/python3.7/site-packages/astropy/utils/iers/iers.py", line 642, in open
    cls.iers_table = cls.read(file=filename)
  File "/usr/local/lib/python3.7/site-packages/astropy/utils/iers/iers.py", line 502, in read
    table = cls._combine_a_b_columns(iers_a)
  File "/usr/local/lib/python3.7/site-packages/astropy/utils/iers/iers.py", line 464, in _combine_a_b_columns
    is_predictive = (table['UT1Flag_A'] == 'P') | (table['PolPMFlag_A'] == 'P')
  File "/usr/local/lib/python3.7/site-packages/numpy/ma/core.py", line 3016, in __array_finalize__
    self._fill_value = _check_fill_value(self._fill_value, self.dtype)
  File "/usr/local/lib/python3.7/site-packages/numpy/ma/core.py", line 476, in _check_fill_value
    fill_value = np.array(fill_value, copy=False, dtype=ndtype)
ValueError: invalid literal for int() with base 10: 'N'

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:11 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
bsipoczcommented, Oct 23, 2018

the ci-helpers PR is this one, and should be merged once CI is green on it: https://github.com/astropy/ci-helpers/pull/331

0reactions
pllimcommented, Oct 26, 2018

Patch upstream is merged. We’ll just have to wait for 1.15.4.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Pandas incompatible with numpy - Stack Overflow
In conda list, my numpy version is 1.19. 1. I checked the above directory to find that it has only numpy 1.15. 3...
Read more >
NumPy 1.15.0 Release Notes
The wheels are linked with OpenBLAS v0.3.0, which should fix some of the linalg ... with the new location, and should consider not...
Read more >
Error Message "Please upgrade numpy to >= xxx to use this ...
Both Conda and pip packages are installed. Some packages cannot be uninstalled. Solution. Perform the following operations to resolve this issue: Uninstall theΒ ......
Read more >
Error installing numpy on m1 Mac using terminal - Python
Ok so I've actually solved my own issue! :joy: Solution = Quit terminal; Find terminal app icon via finder; Right-click the terminal icon...
Read more >
Numpy Error - Deploying on Streamlit Cloud
ERROR : Could not find a version that satisfies the requirement ... 1.15.0rc1, 1.15.0rc2, 1.15.0, 1.15.1, 1.15.2, 1.15.3, 1.15.4, 1.16.0rc1,Β ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found