|

楼主 |
发表于 2024-5-9 13:05:41
|
显示全部楼层
报错:
Traceback (most recent call last):
File "D:\PycharmProjects\pythonProject\.venv\Lib\site-packages\pandas\core\indexes\base.py", line 3805, in get_loc
return self._engine.get_loc(casted_key)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "index.pyx", line 167, in pandas._libs.index.IndexEngine.get_loc
File "index.pyx", line 196, in pandas._libs.index.IndexEngine.get_loc
File "pandas\\_libs\\hashtable_class_helper.pxi", line 7081, in pandas._libs.hashtable.PyObjectHashTable.get_item
File "pandas\\_libs\\hashtable_class_helper.pxi", line 7089, in pandas._libs.hashtable.PyObjectHashTable.get_item
KeyError: 'name'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
line 1118, in select_folder
self.setup_area_selection(self.comboboxes, self.Region_file)
line 1151, in setup_area_selection
name = row['name']
~~~^^^^^^^^
File "D:\PycharmProjects\pythonProject\.venv\Lib\site-packages\pandas\core\series.py", line 1112, in __getitem__
return self._get_value(key)
^^^^^^^^^^^^^^^^^^^^
File "D:\PycharmProjects\pythonProject\.venv\Lib\site-packages\pandas\core\series.py", line 1228, in _get_value
loc = self.index.get_loc(label)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\PycharmProjects\pythonProject\.venv\Lib\site-packages\pandas\core\indexes\base.py", line 3812, in get_loc
raise KeyError(key) from err
KeyError: 'name' |
|