You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Error when handling CircumpolarError in solar calculations #9514
When handling CircumpolarError in solar calculations, the following code snippet raises a TypeError: unsupported operand type(s) for +: 'ephem.Date' and 'datetime.timedelta'
except self.ephem.CircumpolarError: # pragma: no cover
# Sun won't rise/set today. Check again tomorrow
# (specifically, after the next anti-transit).
next_utc = (
self.cal.next_antitransit(self.ephem.Sun()) +
timedelta(minutes=1)
)
The error occurs because self.cal.next_antitransit(self.ephem.Sun()) returns an ephem.Date object, which cannot be directly added to a datetime.timedelta object.
Activity
auvipy commentedon Jan 28, 2025
you should have follow a project issue template. also can you please elaborate more regarding your usage?