Skip to content

Commit

Permalink
Catch error if comets missing info
Browse files Browse the repository at this point in the history
  • Loading branch information
brickbots committed Feb 9, 2025
1 parent a0e59cd commit 77d6910
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions python/PiFinder/catalogs.py
Original file line number Diff line number Diff line change
Expand Up @@ -776,9 +776,13 @@ def do_timed_task(self):
return
for obj in self._get_objects():
name = obj.names[0]
logger.debug("Processing %s")
logger.debug("Processing %s" % name)
comet = comet_dict.get(name, {})
obj.ra, obj.dec = comet["radec"]
try:
obj.ra, obj.dec = comet["radec"]
except KeyError:
logger.error("No radec for comet " + name)
continue
obj.mag = MagnitudeObject([comet["mag"]])
obj.const = sf_utils.radec_to_constellation(obj.ra, obj.dec)
obj.mag_str = obj.mag.calc_two_mag_representation()
Expand Down

0 comments on commit 77d6910

Please sign in to comment.