質問編集履歴

1

エラー内容の詳細

2018/09/28 02:12

投稿

ksuhara
ksuhara

スコア13

test CHANGED
File without changes
test CHANGED
@@ -1,14 +1,50 @@
1
- google cloud visionの顔検出のチュートリアル([https://cloud.google.com/vision/docs/face-tutorial](https://cloud.google.com/vision/docs/face-tutorial))を試しているのですが、表題の通りこのようなエラーでつまづいてます。githubのコードをほぼそのままコピペしています。
1
+ google cloud visionの顔検出のチュートリアル([https://cloud.google.com/vision/docs/face-tutorial](https://cloud.google.com/vision/docs/face-tutorial))を試しているのですが、表題の通りこのようなエラーでつまづいてます。
2
+
3
+
4
+
5
+
6
+
2
-
7
+ ```ここに言語を入力
8
+
3
-
9
+ Traceback (most recent call last):
10
+
11
+ File "google_face_detect.py", line 79, in <module>
12
+
13
+ main(args.input_image, args.output, args.max_results)
14
+
15
+ File "google_face_detect.py", line 55, in main
16
+
17
+ faces = detect_face(image, max_results)
18
+
19
+ File "google_face_detect.py", line 26, in detect_face
20
+
21
+ return client.face_detection(image=image).face_annotations
22
+
23
+ File "/Users/kentasuhara/.pyenv/versions/anaconda3-5.0.0/lib/python3.6/site-packages/google/cloud/vision_helpers/decorators.py", line 111, in inner
24
+
25
+ response = self.annotate_image(request, retry=retry, timeout=timeout)
26
+
27
+ File "/Users/kentasuhara/.pyenv/versions/anaconda3-5.0.0/lib/python3.6/site-packages/google/cloud/vision_helpers/__init__.py", line 67, in annotate_image
28
+
29
+ r = self.batch_annotate_images([request], retry=retry, timeout=timeout)
30
+
31
+ File "/Users/kentasuhara/.pyenv/versions/anaconda3-5.0.0/lib/python3.6/site-packages/google/cloud/vision_v1/gapic/image_annotator_client.py", line 209, in batch_annotate_images
32
+
33
+ self.transport.batch_annotate_images,
4
34
 
5
35
  AttributeError: 'str' object has no attribute 'batch_annotate_images'
6
36
 
37
+ ```
38
+
39
+
40
+
7
41
  どこがstrになっていてどう直せばいいのでしょうか?
8
42
 
9
43
 
10
44
 
45
+ コードは以下の通りで、githubのコードをほぼそのままコピペしています。
46
+
11
- ターミナルで実行しているコードは $python google_face_detect.py(ファイル名) 画像の絶対パス
47
+ またターミナルで実行しているコードは $python google_face_detect.py(ファイル名) 画像の絶対パス です。
12
48
 
13
49
 
14
50