panoptes / POCS

An Observatory Control System for the PANOPTES citizen-science project designed to help find transiting exoplanets! :telescope: :stars:
https://pocs.readthedocs.io/en/latest/
MIT License
77 stars 49 forks source link

mount park fails #1181

Closed oguyon closed 1 year ago

oguyon commented 1 year ago

Describe the bug mount park returns error, does not park

Edit (@wtgee): This is on the CEM40 (post-2021) running the 2021 firmware and using command set v310.

To Reproduce Steps to reproduce the behavior:

  1. mount.park()
W 05-16 05:22:57.438 Cannot create SkyCoord from mount coordinates

---------------------------------------------------------------------------
ParserError                               Traceback (most recent call last)
Cell In[7], line 1
----> 1 mount.park()

File ~/pocs/src/panoptes/pocs/mount/ioptron/cem40.py:172, in Mount.park(self, park_direction, park_seconds, *args, **kwargs)
    170 self.unpark()
    171 self.query('park')
--> 172 while self.status.get('state') != MountState.PARKED:
    173     self.logger.trace(f'Moving to park')
    174     time.sleep(1)

File ~/pocs/src/panoptes/pocs/mount/mount.py:143, in AbstractMount.status(self)
    140 except Exception as e:
    141     self.logger.debug(f'Problem getting mount status: {e!r}')
--> 143 status.update(self._update_status())
    144 return status

File ~/pocs/src/panoptes/pocs/mount/ioptron/cem40.py:363, in Mount._update_status(self)
    361 ts = self.query('get_local_time')
    362 offset = int(float(ts[:4]) / 60)
--> 363 status['timestamp'] = parse_date(f'{ts[5:11]}T{ts[11:]}{offset}', yearfirst=True)
    364 status['tracking_rate_ra'] = self.tracking_rate
    366 return status

File ~/conda/envs/conda-pocs/lib/python3.11/site-packages/dateutil/parser/_parser.py:1368, in parse(timestr, parserinfo, **kwargs)
   1366     return parser(parserinfo).parse(timestr, **kwargs)
   1367 else:
-> 1368     return DEFAULTPARSER.parse(timestr, **kwargs)

File ~/conda/envs/conda-pocs/lib/python3.11/site-packages/dateutil/parser/_parser.py:643, in parser.parse(self, timestr, default, ignoretz, tzinfos, **kwargs)
    640 res, skipped_tokens = self._parse(timestr, **kwargs)
    642 if res is None:
--> 643     raise ParserError("Unknown string format: %s", timestr)
    645 if len(res) == 0:
    646     raise ParserError("String does not contain a date: %s", timestr)

ParserError: Unknown string format: 073748T6647216-10