Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

i am facing the below error, i have installed all the packages #21

Open
millermuttu opened this issue Feb 6, 2020 · 5 comments
Open

Comments

@millermuttu
Copy link

File "matching_nets.py", line 76, in
background = dataset_class('background')
File "C:\Users\sjm6kor\Desktop\one_shot\few-shot-master\experiments\datasets.py", line 113, in init
self.unique_characters = sorted(self.df['class_name'].unique())
File "C:\Users\sjm6kor\AppData\Roaming\Python\Python36\site-packages\pandas\core\frame.py", line 2995, in getitem
indexer = self.columns.get_loc(key)
File "C:\Users\sjm6kor\AppData\Roaming\Python\Python36\site-packages\pandas\core\indexes\base.py", line 2899, in get_loc
return self._engine.get_loc(self._maybe_cast_indexer(key))
File "pandas/_libs/index.pyx", line 107, in pandas._libs.index.IndexEngine.get_loc
File "pandas/_libs/index.pyx", line 131, in pandas._libs.index.IndexEngine.get_loc
File "pandas/_libs/hashtable_class_helper.pxi", line 1607, in pandas._libs.hashtable.PyObjectHashTable.get_item
File "pandas/_libs/hashtable_class_helper.pxi", line 1614, in pandas._libs.hashtable.PyObjectHashTable.get_item
KeyError: 'class_name'

@ChenjieSun
Copy link

File "matching_nets.py", line 76, in
background = dataset_class('background')
File "C:\Users\sjm6kor\Desktop\one_shot\few-shot-master\experiments\datasets.py", line 113, in init
self.unique_characters = sorted(self.df['class_name'].unique())
File "C:\Users\sjm6kor\AppData\Roaming\Python\Python36\site-packages\pandas\core\frame.py", line 2995, in getitem
indexer = self.columns.get_loc(key)
File "C:\Users\sjm6kor\AppData\Roaming\Python\Python36\site-packages\pandas\core\indexes\base.py", line 2899, in get_loc
return self._engine.get_loc(self._maybe_cast_indexer(key))
File "pandas/_libs/index.pyx", line 107, in pandas._libs.index.IndexEngine.get_loc
File "pandas/_libs/index.pyx", line 131, in pandas._libs.index.IndexEngine.get_loc
File "pandas/_libs/hashtable_class_helper.pxi", line 1607, in pandas._libs.hashtable.PyObjectHashTable.get_item
File "pandas/_libs/hashtable_class_helper.pxi", line 1614, in pandas._libs.hashtable.PyObjectHashTable.get_item
KeyError: 'class_name'

it might be something wrong with your dataset. Make sure the path is correct and the dataset is well processed, You can try if it fails on all the methods.

@JimKlingshirn
Copy link

The problem is with the mini-imagenet download file, referenced in README.md. The script searches for .jpg files, but the download contains pickle files.

@xwuShirley
Copy link

xwuShirley commented Mar 29, 2020

KeyError: 'class_name'

Hey, @millermuttu did you solve your problem? Could you share it here? I have the sample problem for Omniglot

Oops, never mind. @ChenjieSun Thanks for the solution

@zcjgl
Copy link

zcjgl commented Sep 4, 2020

@millermuttu @xwuShirley hello,did you solve your problem? I have the same problem and i have tried my best but failed ,could you share it?Thank you very much.

@a2409895438
Copy link

I had the same problem and I had solved it. You must make sure that your file 'images_background' is in folder 'DATA_PATH + '/miniImageNet'', or your 'self.df' will be empty.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants