Python api调用在本地计算机上运行良好,但在Azure VM上运行时失败

Python api调用在本地计算机上运行良好,但在Azure VM上运行时失败,python,azure,virtual-machine,azure-vm,Python,Azure,Virtual Machine,Azure Vm,我有一个利用Azure Vision API的Python应用程序。我将图像发送到Azure Vision OCR并从中读取输出。通常的答复如下: **{'status': 'succeeded', 'createdDateTime': '2020-11-20T05:07:46Z', 'lastUpdatedDateTime': '2020-11-20T05:07:46Z', 'analyzeResult': {'version': '3.0.0', 'readResults': [{'page

我有一个利用Azure Vision API的Python应用程序。我将图像发送到Azure Vision OCR并从中读取输出。通常的答复如下:

**{'status': 'succeeded', 'createdDateTime': '2020-11-20T05:07:46Z', 'lastUpdatedDateTime': '2020-11-20T05:07:46Z', 'analyzeResult': {'version': '3.0.0', 'readResults': [{'page': 1, 'angle': 0, 'width': 500, 'height': 265, 'unit': 'pixel', 'lines': []}]}}** 
**{'status': 'running', 'createdDateTime': '2020-11-23T09:23:09Z', 'lastUpdatedDateTime': '2020-11-23T09:23:09Z'}**
当我在azure上运行相同的应用程序,并且python应用程序发出相同的调用时,它返回一个响应,如下所示:

**{'status': 'succeeded', 'createdDateTime': '2020-11-20T05:07:46Z', 'lastUpdatedDateTime': '2020-11-20T05:07:46Z', 'analyzeResult': {'version': '3.0.0', 'readResults': [{'page': 1, 'angle': 0, 'width': 500, 'height': 265, 'unit': 'pixel', 'lines': []}]}}** 
**{'status': 'running', 'createdDateTime': '2020-11-23T09:23:09Z', 'lastUpdatedDateTime': '2020-11-23T09:23:09Z'}**

我没有获得成功的状态,
analyzeResult
不存在。如何解决此问题?

什么是AnalyzerResult?它是结果存在的部分。基本上,结果是丢失。你能提供关于代码部分的更多详细信息吗?我正在使用带有字符(例如:收据)的二值化图像(黑白),并将其发送到Azure OCR服务以获取字符串作为响应。它可以在我本地的机器上正常工作。但我需要在Azure虚拟机上运行它。当它部署在VM中时,不会收到来自Azure OCR的响应。上述回答就是结果。我正在使用python“请求”库发出请求。@NethmalWarusamana您是否尝试查看详细/调试日志?