質問編集履歴
4
A
test
CHANGED
@@ -1 +1 @@
|
|
1
|
-
google.auth.exceptions.DefaultCredentialsError:json was not found.
|
1
|
+
google.auth.exceptions.DefaultCredentialsError:json was not found.
|
test
CHANGED
@@ -1,34 +1 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
[Errno 2] No such file or directory: './image.jpg'
|
1
|
+
[Errno 2] No such file or directory: './image.jpg'
|
6
|
-
|
7
|
-
解決策を教えてください。
|
8
|
-
|
9
|
-

|
10
|
-
### 発生している問題・エラーメッセージ
|
11
|
-
|
12
|
-
```
|
13
|
-
FileNotFoundError: [Errno 2] No such file or directory: './image.jpg'
|
14
|
-
```
|
15
|
-
|
16
|
-
```python
|
17
|
-
#visionをインポート
|
18
|
-
from google.cloud import vision
|
19
|
-
|
20
|
-
#image.jpgを開いて読み込む
|
21
|
-
with open('./image.jpg', 'rb') as image_file:
|
22
|
-
content = image_file.read()
|
23
|
-
|
24
|
-
#vision APIが扱える画像データにする
|
25
|
-
image = vision.Image(content=content)
|
26
|
-
|
27
|
-
#ImageAnnotatorClientのインスタンスを生成
|
28
|
-
annotator_client = vision.ImageAnnotatorClient()
|
29
|
-
|
30
|
-
print(annotator_client.label_detection(image=image))
|
31
|
-
```
|
32
|
-
|
33
|
-
|
34
|
-
|
3
更新
test
CHANGED
File without changes
|
test
CHANGED
@@ -1,12 +1,11 @@
|
|
1
|
-
|
1
|
+
|
2
|
-
|
2
|
+
|
3
|
-

|
4
3
|
|
5
4
|
|
6
5
|
[Errno 2] No such file or directory: './image.jpg' と表示され上手いこといきません。
|
7
6
|
|
8
7
|
解決策を教えてください。
|
9
|
-
|
8
|
+
|
10
9
|

|
11
10
|
### 発生している問題・エラーメッセージ
|
12
11
|
|
2
新しいエラー
test
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
google.auth.exceptions.DefaultCredentialsError:json was not found.解決策を教えてください。
|
test
CHANGED
File without changes
|
1
新しいエラー
test
CHANGED
File without changes
|
test
CHANGED
@@ -1,4 +1,7 @@
|
|
1
|
-
|
1
|
+
新しいエラー
|
2
|
+
google.auth.exceptions.DefaultCredentialsError:json was not found.
|
3
|
+

|
4
|
+
|
2
5
|
|
3
6
|
[Errno 2] No such file or directory: './image.jpg' と表示され上手いこといきません。
|
4
7
|
|