503使用Python SDK的IBM Watson视觉识别服务出现内部服务器错误(写入)
我正在尝试为Watson视觉识别服务创建视觉识别分类器:503使用Python SDK的IBM Watson视觉识别服务出现内部服务器错误(写入),python,ibm-watson,visual-recognition,Python,Ibm Watson,Visual Recognition,我正在尝试为Watson视觉识别服务创建视觉识别分类器: import json from ibm_watson import VisualRecognitionV3, ApiException from ibm_cloud_sdk_core.authenticators import IAMAuthenticator visual_recognition = VisualRecognitionV3( version='2018-03-19', ) try: with ope
import json
from ibm_watson import VisualRecognitionV3, ApiException
from ibm_cloud_sdk_core.authenticators import IAMAuthenticator
visual_recognition = VisualRecognitionV3(
version='2018-03-19',
)
try:
with open('./img/burgers.zip', 'rb') as food, open(
'./img/hot_dogs.zip', 'rb') as hot_dogs:
model = visual_recognition.create_classifier(
'food',
positive_examples={'burgers': burgers},
negative_examples=hot_dogs).get_result()
print(json.dumps(model, indent=2))
except ApiException as ex:
print(f'Method failed with status code {str(ex.code)}: {ex.message}')
但我一直收到一个503错误:
ERROR:root:<HTML><HEAD>
<TITLE>Internal Server Error</TITLE>
</HEAD><BODY>
<H1>Internal Server Error - Write</H1>
The server encountered an internal error or misconfiguration and was unable to
complete your request.<P>
Reference #4.377f1cb8.1604430314.136c3668
</BODY></HTML>
Traceback (most recent call last):
File "/Users/.../lib/python3.8/site-packages/ibm_cloud_sdk_core/base_service.py", line 224, in send
raise ApiException(
ibm_cloud_sdk_core.api_exception.ApiException: Error: <HTML><HEAD>
<TITLE>Internal Server Error</TITLE>
</HEAD><BODY>
<H1>Internal Server Error - Write</H1>
The server encountered an internal error or misconfiguration and was unable to
complete your request.<P>
Reference #4.377f1cb8.1604430314.136c3668
</BODY></HTML>
, Code: 503
Method failed with status code 503: <HTML><HEAD>
<TITLE>Internal Server Error</TITLE>
</HEAD><BODY>
<H1>Internal Server Error - Write</H1>
The server encountered an internal error or misconfiguration and was unable to
complete your request.<P>
Reference #4.377f1cb8.1604430314.136c3668
</BODY></HTML>
错误:根目录:
内部服务器错误
内部服务器错误-写入
服务器遇到内部错误或配置错误,无法运行
完成您的请求。
参考文献 #4.377f1cb8&46;1604430314.136c3668
回溯(最近一次呼叫最后一次):
文件“/Users/../lib/python3.8/site packages/ibm\u cloud\u sdk\u core/base\u service.py”,第224行,在send中
引发异常(
ibm_cloud_sdk_core.api_exception.ApiException:错误:
内部服务器错误
内部服务器错误-写入
服务器遇到内部错误或配置错误,无法运行
完成您的请求。
参考文献 ;#;4.;377f1cb8.;1604430314.;136c3668
,电话号码:503
方法失败,状态代码为503:
内部服务器错误
内部服务器错误-写入
服务器遇到内部错误或配置错误,无法运行
完成您的请求。
参考文献 ;#;4.;377f1cb8.;1604430314.;136c3668
我可以使用相同的凭据对图像进行分类,因此我不确定分类器创建为何不起作用。将代码与API文档进行比较--您似乎没有使用验证器。