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.

IERSRangeError after downloading table from USNO

See original GitHub issue

Description

Recent dates don’t seem to be included in the IERS table when I force a fresh download

Expected behavior

I expected to convert a recent date

Actual behavior

astropy.utils.iers.iers.IERSRangeError: (some) times are outside of range covered by IERS table.

Steps to Reproduce

# Put your Python code snippet here.
from astropy.utils.data import download_file
from astropy.time import Time, TimeDelta
from astropy.utils import iers
url = 'https://maia.usno.navy.mil/ser7/finals2000A.all'
filename = download_file(url, cache=False)  # Force download of latest copy
dat = iers.IERS_Auto.read(file=filename)
iers.IERS.iers_table = dat
iers.conf.auto_download = False
(Time.now()-TimeDelta(3)).ut1 #Raises Error
# astropy.utils.iers.iers.IERSRangeError: (some) times are outside of range covered by IERS table.
for i in range(1000):
    try:
        LastDate = (Time('2021-01-11')+TimeDelta(i)).ut1
    except iers.iers.IERSRangeError:
        print(Time('2021-01-11')+TimeDelta(i))
        break
# 2022-02-06 00:00:00.000 is the first date that cannot be converted


System Details

Python 3.9.12 (main, Apr 5 2022, 06:56:58) [GCC 7.5.0] Numpy 1.21.5 pyerfa 2.0.0 astropy 5.0.4 Scipy 1.7.3 Matplotlib 3.5.1

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:8 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
Warren-Portercommented, May 7, 2022

Setting earth_orientation_table explicitly works for me. Thank you!

0reactions
pllimcommented, May 7, 2022

@Warren-Porter , glad the workaround worked for you. Are you still interested to submit a PR to fix the underlying bug as mentioned in https://github.com/astropy/astropy/issues/13227#issuecomment-1120071914 ? 😸

Read more comments on GitHub >

github_iconTop Results From Across the Web

Source code for astropy.utils.iers.iers
Normally you should not see this error because this class automatically downloads the latest IERS-A table. Perhaps you are offline?
Read more >
astropy.utils.iers.iers — Astropy v3.2.dev2792 - Read the Docs
[docs]class IERSRangeError(IndexError): """ Any error for when dates are outside ... IERS_A(IERS): """IERS Table class targeted to IERS A, provided by USNO.
Read more >
statgen.us/files/software/seqpower/usr/local/lib/a...
IERSRangeError : (some) times are outside of range covered by IERS table. ... Instead of local copies of IERS files, one can also...
Read more >
Duration of Daylight/Darkness Table for One Year
Specify the location of interest using the fields provided on the form. Use the buttons to find coordinates of cities or towns in...
Read more >
Download - Redivis Documentation
Through the table export modal, you can easily export full data in several common file formats, as well as the table metadata. In...
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