当我使用邮差退回我的API的调用时,它会返回错误
“例外”:“#”,
我完全不明白为什么会收到此错误,所以我还没有真正尝试过任何操作。
NluCallsController类 结束 它应返回一个JSON对象,其中包含从给出的URL分析的类别。相反,它返回:
def create
@nlu_call = NluCall.new
@nlu_call.url = params[:url]
r = IBMWatson::NaturalLanguageUnderstandingV1.new(
version: "2018-11-16",
iam_apikey: ENV["NATURAL_LANGUAGE_UNDERSTANDING_IAM_APIKEY"],
url: ENV["NATURAL_LANGUAGE_UNDERSTANDING_URL"]
).analyze(
url: @nlu_call.url,
features: {concepts: {limit:5}}
)
@nlu_call.response = r
if @nlu_call.save!
respond_to do |format|
format.json @nlu_call.response
end
end
end
NoMethodError (undefined method
+'代表nil:NilClass):
because of this line:
)。analyze(`