Short-bus / pilomar

RaspberryPi based miniature observatory
https://shortbus.blog/
GNU General Public License v3.0
63 stars 14 forks source link

MarkupPreview throws Pandas error if 'knownas' column is not available. #31

Closed Short-bus closed 8 months ago

Short-bus commented 8 months ago

09:19:47 Begin preview image generation. Exception in thread Thread-2: Traceback (most recent call last): File "/usr/local/lib/python3.7/dist-packages/pandas/core/indexes/base.py", line 3361, in get_loc return self._engine.get_loc(casted_key) File "pandas/_libs/index.pyx", line 76, in pandas._libs.index.IndexEngine.get_loc File "pandas/_libs/index.pyx", line 108, in pandas._libs.index.IndexEngine.get_loc File "pandas/_libs/hashtable_class_helper.pxi", line 5198, in pandas._libs.hashtable.PyObjectHashTable.get_item File "pandas/_libs/hashtable_class_helper.pxi", line 5206, in pandas._libs.hashtable.PyObjectHashTable.get_item KeyError: 'knownas'

Column is not available in the data for this version of the program. Field reference needs to be removed.

Short-bus commented 8 months ago

Dug deeper: data/ngc.json file is out of date, new version with knownas column included to be updated in this package.

Short-bus commented 8 months ago

pilomar.py is now tolerant of the missing column. Updated ngc.json to include the latest columns.

Short-bus commented 8 months ago

Closed.