aiidalab / aiidalab-qe

AiiDAlab App for Quantum ESPRESSO
https://aiidalab-qe.readthedocs.io/
MIT License
11 stars 14 forks source link

Job list page error if there is not jobs #691

Closed superstar54 closed 5 months ago

superstar54 commented 5 months ago

Describe the bug In a fresh container, without jobs.

AiiDAlab QuantumESPRESSO App

KeyError Traceback (most recent call last) /tmp/ipykernel_5654/1471599892.py in <cell line: 3>() 1 from aiidalab_qe.app.utils.search_jobs import QueryInterface 2 ----> 3 qi = QueryInterface() 4 qi.filters_layout

~/.local/lib/python3.9/site-packages/aiidalab_qe/app/utils/search_jobs.py in init(self) 8 class QueryInterface: 9 def init(self): ---> 10 self.df = self.load_data() 11 self.table = ipw.HTML() 12 self.setup_widgets()

~/.local/lib/python3.9/site-packages/aiidalab_qe/app/utils/search_jobs.py in load_data(self) 46 f"""Inspect""" 47 ) ---> 48 return df[ 49 [ 50 "PK",

~/.local/lib/python3.9/site-packages/pandas/core/frame.py in getitem(self, key) 4106 if is_iterator(key): 4107 key = list(key) -> 4108 indexer = self.columns._get_indexer_strict(key, "columns")[1] 4109 4110 # take() does not accept boolean indexers

~/.local/lib/python3.9/site-packages/pandas/core/indexes/base.py in _get_indexer_strict(self, key, axis_name) 6198 keyarr, indexer, new_indexer = self._reindex_non_unique(keyarr) 6199 -> 6200 self._raise_if_missing(keyarr, indexer, axis_name) 6201 6202 keyarr = self.take(indexer)

~/.local/lib/python3.9/site-packages/pandas/core/indexes/base.py in _raise_if_missing(self, key, indexer, axis_name) 6250 6251 not_found = list(ensure_index(key)[missing_mask.nonzero()[0]].unique()) -> 6252 raise KeyError(f"{not_found} not in index") 6253 6254 @overload

KeyError: "['Creation time', 'Delete', 'Inspect'] not in index"