brickbots / PiFinder

A plate solving telescope finder based around a Raspberry PI and RPI HQ Camera
GNU General Public License v3.0
158 stars 30 forks source link

catalog related assertion crash in main #103

Closed mrosseel closed 1 year ago

mrosseel commented 1 year ago

crash found by running random2 script:

Traceback (most recent call last):
  File "/opt/homebrew/Caskroom/miniconda/base/lib/python3.10/runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/opt/homebrew/Caskroom/miniconda/base/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/Users/mike/dev/amateur_astro/myPiFinder/python/PiFinder/main.py", line 816, in <module>
    main(args.script, args.server, args.fps)
  File "/Users/mike/dev/amateur_astro/myPiFinder/python/PiFinder/main.py", line 598, in main
    current_module.active()
  File "/Users/mike/dev/amateur_astro/myPiFinder/python/PiFinder/ui/catalog.py", line 330, in active
    self.catalog_tracker.set_current_object(
  File "/Users/mike/dev/amateur_astro/myPiFinder/python/PiFinder/catalogs.py", line 402, in set_current_object
    self.set_current_catalog(catalog_name)
  File "/Users/mike/dev/amateur_astro/myPiFinder/python/PiFinder/catalogs.py", line 332, in set_current_catalog
    assert catalog_name in self.catalogs, f"{catalog_name} not in {self.catalogs}"
AssertionError: SaM not in {'IC': catalog repr, 'M': catalog repr, 'Str': catalog repr, 'Col': catalog repr, 'Her': catalog repr, 'Ta2': catalog repr, 'SaA': catalog repr}
ERROR:root:EOFError in Camera Loop
Screenshot 2023-10-01 at 21 34 35
brickbots commented 1 year ago

Replicated and fixed! If you de-activated the catalog for the currently selected/targeted object, it would crash