Closed craeftsmith closed 4 years ago
First, a quick double-check: is the error coming from Skyfield, or from another library? Could you share the full traceback? Thanks!
Oh shoot... It's in Ephem not Skyfield. Sorry about that.
Here is the traceback:
Traceback (most recent call last):
File "./sat_visible.py", line 56, in
My guess is that it would be difficult to improve that situation in PyEphem, because the underlying C library raises an error there and user code by this point probably expects it. I recommend catching the exception.
It's raised in that line because PyEphem tries to be efficient by computing things lazily, only when they're asked for, instead of when compute()
is called. It was a pretty poor design, I admit!
I am not completely sure that I have correctly diagnosed this behavior, but assuming I did...
I am checking to see which satellites are above the horizon at a place. Here is a snippet
object = ephem.readtle(row[0],row[1],row[2]) object.compute(place) if object.neverup == False and object.alt > 0: