-
Notifications
You must be signed in to change notification settings - Fork 5
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
Does the search_object method expect a shortname column?
t = db.search_object(
simbad_names, output_table="Sources", fmt="astropy", fuzzy_search=False
)
tests/scheduled_checks.py:48:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
../../../../miniforge3/envs/template-dev/lib/python3.13/site-packages/astrodbkit/utils.py:26: in wrapper
return f(*args, **kwargs)
../../../../miniforge3/envs/template-dev/lib/python3.13/site-packages/astrodbkit/astrodb.py:570: in search_object
filters = [self.metadata.tables[k].columns[v].ilike(f"{n}") for n in name]
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <sqlalchemy.sql.base.ReadOnlyColumnCollection object at 0x141491940>, key = 'shortname'
def __getitem__(
self, key: Union[str, int, slice, Tuple[Union[str, int], ...]]
) -> Union[ReadOnlyColumnCollection[_COLKEY, _COL_co], _COL_co]:
try:
if isinstance(key, (tuple, slice)):
if isinstance(key, slice):
cols = (
(sub_key, col)
for (sub_key, col, _) in self._collection[key]
)
else:
cols = (self._index[sub_key] for sub_key in key)
return ColumnCollection(cols).as_readonly()
else:
> return self._index[key][1]
E KeyError: 'shortname'
../../../../miniforge3/envs/template-dev/lib/python3.13/site-packages/sqlalchemy/sql/base.py:1605: KeyError
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request