teratail header banner
teratail header banner
質問するログイン新規登録

質問編集履歴

1

KyeError:VisitedFramesと表示された

2019/08/07 08:46

投稿

ponzuuuuu
ponzuuuuu

スコア19

title CHANGED
File without changes
body CHANGED
@@ -5,27 +5,27 @@
5
5
  ### 発生している問題・エラーメッセージ
6
6
 
7
7
  ```
8
- FileNotFoundError Traceback (most recent call last)
8
+ KeyError Traceback (most recent call last)
9
- <ipython-input-20-e0b618e54b8d> in <module>()
9
+ <ipython-input-24-8b5d4622bced> in <module>()
10
10
  75
11
11
  76 if __name__ == '__main__':
12
12
  ---> 77 _main()
13
13
 
14
- <ipython-input-20-e0b618e54b8d> in _main()
14
+ <ipython-input-24-8b5d4622bced> in _main()
15
15
  71 image_dir=image_dir,
16
16
  72 train_txt_save_path=train_txt_save_path,
17
17
  ---> 73 classes_txt_save_path=classes_txt_save_path
18
18
  74 )
19
19
  75
20
20
 
21
- <ipython-input-20-e0b618e54b8d> in convert_vott_to_kerasyolo3txt(json_path, image_dir, train_txt_save_path, classes_txt_save_path)
21
+ <ipython-input-24-8b5d4622bced> in convert_vott_to_kerasyolo3txt(json_path, image_dir, train_txt_save_path, classes_txt_save_path)
22
- 7 row_list = []
23
- 8
24
- ----> 9 with open(json_path) as f:
25
- 10 dic = json.load(f)
26
22
  11 tag_set = set()
23
+ 12
24
+ ---> 13 visited_frames = dic['visitedFrames']
25
+ 14
26
+ 15 frames = dic['frames']
27
27
 
28
- FileNotFoundError: [Errno 2] No such file or directory: 'C:Users/PC017/learn/00ac59f09115dc03edfabfd6c85de434-asset.json'
28
+ KeyError: 'visitedFrames'
29
29
 
30
30
  ```
31
31
 
@@ -95,7 +95,7 @@
95
95
 
96
96
 
97
97
  def _main():
98
- json_path='C:Users/PC017/learn/00ac59f09115dc03edfabfd6c85de434-asset.json'
98
+ json_path='C:/Users/PC017/learn/00ac59f09115dc03edfabfd6c85de434-asset.json'
99
99
  image_dir='C:/Users/PC017/learn/'
100
100
  train_txt_save_path='C:/Users/PC017/learn/my_train.txt'
101
101
  classes_txt_save_path='C:/Users/PC017/learn/my_classes.txt'