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

Method get_tle_lines() raises index error when tle lines are empty strings #94

Closed
oliversus opened this issue Sep 2, 2021 · 0 comments · Fixed by #95
Closed

Method get_tle_lines() raises index error when tle lines are empty strings #94

oliversus opened this issue Sep 2, 2021 · 0 comments · Fixed by #95
Assignees
Labels

Comments

@oliversus
Copy link
Contributor

In pod_reader.py._compute_missing_lonlat(): Function get_tle_lines() will raise an IndexError if the next available tle line is not within a user-defined threshold of n days. Pygac should be able to handle this issue, as tle data are gappy, and a fix has been introduced to deal with such cases. In fact, before a recent commit (3f04306), this error has been caught and tle lines were set to emtpy strings.

One could undo that commit, i.e. put that function back into a try clause like so:

        try:
            tle1, tle2 = self.get_tle_lines()
        except IndexError:
            tle1 = tle2 = ''

This would at least allow pygac to continue.
However, this causes new problems in compute_pixels(), which calls pyorbital, thus initializing class Tle. Tle will be unhappy about tle lines being empty strings and thus raise IndexErrors.

As I do not know the code structure well enough: does it make sense to just quit compute_missing_lonlat when there are no tle data within the threshold? Or apply the tle fix here?

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

Successfully merging a pull request may close this issue.

2 participants