pytroll / pyorbital

Orbital and astronomy computations in python
http://pyorbital.readthedocs.org/
GNU General Public License v3.0
224 stars 77 forks source link

pyorbital cannot read TLE for MTG-I1 / Meteosat-12 #140

Closed gerritholl closed 8 months ago

gerritholl commented 9 months ago

Code Sample, a minimal, complete, and verifiable piece of code

import pyorbital.tlefile
pyorbital.tlefile.read("Meteosat-12")

Problem description

This fails with a KeyError.

Expected Output

I expect it reads the TLE. It does for Meteosat-11.

It's being called by trollflow2 check_sunlight_coverage via trollsched using the label MTI1. Not sure if that's supposed to work, but Meteosat-12 probably should as there is a corresponding entry at both https://celestrak.org/NORAD/elements/gp.php?GROUP=active&FORMAT=tle and https://celestrak.org/NORAD/elements/gp.php?GROUP=weather&FORMAT=tle .

Actual Result, Traceback if applicable

Traceback (most recent call last):
  File "/data/gholl/checkouts/protocode/mwe/pyorbital-mti1.py", line 2, in <module>
    pyorbital.tlefile.read("Meteosat-12")
  File "/data/gholl/checkouts/pyorbital/pyorbital/tlefile.py", line 162, in read
    return Tle(platform, tle_file=tle_file, line1=line1, line2=line2)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/data/gholl/checkouts/pyorbital/pyorbital/tlefile.py", line 208, in __init__
    self._read_tle()
  File "/data/gholl/checkouts/pyorbital/pyorbital/tlefile.py", line 249, in _read_tle
    raise KeyError("Found no TLE entry for '%s'" % self._platform)
KeyError: "Found no TLE entry for 'METEOSAT-12'"

Versions of Python, package at hand and relevant dependencies

pyorbital 1.8.1.