You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
raise KeyError(f"None of [{key}] are in the [{axis_name}]") KeyError: "None of [Index(['sender', 'subject'], dtype='object')] are in the [columns]"
#47
Open
mutong184 opened this issue
Nov 13, 2024
· 0 comments
I find there is a bug
there is a bug:
Traceback (most recent call last):
File "/home/lijiajun/pz/palimpzest/demos/simpleDemo.py", line 564, in
print_table(records, cols=cols, gradio=False, plan_str=plan_str)
File "/home/lijiajun/pz/palimpzest/demos/simpleDemo.py", line 306, in print_table
final_df = records_df[print_cols] if not records_df.empty else pd.DataFrame(columns=print_cols)
~~~~~~~~~~^^^^^^^^^^^^
File "/home/lijiajun/.conda/envs/pz2/lib/python3.12/site-packages/pandas/core/frame.py", line 3899, in getitem
indexer = self.columns._get_indexer_strict(key, "columns")[1]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/lijiajun/.conda/envs/pz2/lib/python3.12/site-packages/pandas/core/indexes/base.py", line 6115, in _get_indexer_strict
self._raise_if_missing(keyarr, indexer, axis_name)
File "/home/lijiajun/.conda/envs/pz2/lib/python3.12/site-packages/pandas/core/indexes/base.py", line 6176, in _raise_if_missing
raise KeyError(f"None of [{key}] are in the [{axis_name}]")
KeyError: "None of [Index(['sender', 'subject'], dtype='object')] are in the [columns]"
Solution:
replace the code "records = [{key: record.dict[key] for key in record.dict if not key.startswith("_")} for record in records]" on line 302 of the file "demos/simpleDemo.py" with the new code "records = [{key: record._data[key] for key in record.data if not key.startswith("")} for record in records]"
The text was updated successfully, but these errors were encountered:
I find there is a bug
there is a bug:
Traceback (most recent call last):
File "/home/lijiajun/pz/palimpzest/demos/simpleDemo.py", line 564, in
print_table(records, cols=cols, gradio=False, plan_str=plan_str)
File "/home/lijiajun/pz/palimpzest/demos/simpleDemo.py", line 306, in print_table
final_df = records_df[print_cols] if not records_df.empty else pd.DataFrame(columns=print_cols)
~~~~~~~~~~^^^^^^^^^^^^
File "/home/lijiajun/.conda/envs/pz2/lib/python3.12/site-packages/pandas/core/frame.py", line 3899, in getitem
indexer = self.columns._get_indexer_strict(key, "columns")[1]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/lijiajun/.conda/envs/pz2/lib/python3.12/site-packages/pandas/core/indexes/base.py", line 6115, in _get_indexer_strict
self._raise_if_missing(keyarr, indexer, axis_name)
File "/home/lijiajun/.conda/envs/pz2/lib/python3.12/site-packages/pandas/core/indexes/base.py", line 6176, in _raise_if_missing
raise KeyError(f"None of [{key}] are in the [{axis_name}]")
KeyError: "None of [Index(['sender', 'subject'], dtype='object')] are in the [columns]"
Solution:
replace the code "records = [{key: record.dict[key] for key in record.dict if not key.startswith("_")} for record in records]" on line 302 of the file "demos/simpleDemo.py" with the new code "records = [{key: record._data[key] for key in record.data if not key.startswith("")} for record in records]"
The text was updated successfully, but these errors were encountered: