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

KeyError: 'video_path' in Model_RGB #22

Open
abhirup2691 opened this issue Sep 10, 2020 · 0 comments
Open

KeyError: 'video_path' in Model_RGB #22

abhirup2691 opened this issue Sep 10, 2020 · 0 comments

Comments

@abhirup2691
Copy link

abhirup2691 commented Sep 10, 2020

I guess this issue had happened with people a lot,but whatsoever was not able to fix with the solutions provided. Please help
I am currently using Google Colab to run the file Model_RGB.py

KeyError: 'video_path'

During handling of the above exception, another exception occurred:

KeyError Traceback (most recent call last)
5 frames
in ()
452
453 if name == "main":
--> 454 main()

in main()
448
449 def main():
--> 450 train()
451
452

in train()
247 train_data = get_video_train_data(video_train_data_path, video_train_feat_path)
248 train_captions = train_data['Description'].values
--> 249 test_data = get_video_test_data(video_test_data_path, video_test_feat_path)
250 test_captions = test_data['Description'].values
251

in get_video_test_data(video_data_path, video_feat_path)
199 video_data = video_data[video_data['Description'].map(lambda x: isinstance(x, str))]
200
--> 201 unique_filenames = sorted(video_data['video_path'].unique())
202 test_data = video_data[video_data['video_path'].map(lambda x: x in unique_filenames)]
203 return test_data

/usr/local/lib/python3.6/dist-packages/pandas/core/frame.py in getitem(self, key)
2798 if self.columns.nlevels > 1:
2799 return self._getitem_multilevel(key)
-> 2800 indexer = self.columns.get_loc(key)
2801 if is_integer(indexer):
2802 indexer = [indexer]

/usr/local/lib/python3.6/dist-packages/pandas/core/indexes/base.py in get_loc(self, key, method, tolerance)
2646 return self._engine.get_loc(key)
2647 except KeyError:
-> 2648 return self._engine.get_loc(self._maybe_cast_indexer(key))
2649 indexer = self.get_indexer([key], method=method, tolerance=tolerance)
2650 if indexer.ndim > 1 or indexer.size > 1:

pandas/_libs/index.pyx in pandas._libs.index.IndexEngine.get_loc()

pandas/_libs/index.pyx in pandas._libs.index.IndexEngine.get_loc()

pandas/_libs/hashtable_class_helper.pxi in pandas._libs.hashtable.PyObjectHashTable.get_item()

pandas/_libs/hashtable_class_helper.pxi in pandas._libs.hashtable.PyObjectHashTable.get_item()

KeyError: 'video_path'

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

1 participant