cancel
Showing results for 
Search instead for 
Did you mean: 

microsoft azure OCR

aseelodeh
Level 5
hello, i get this error when using Microsoft azure OCR skill 
"Internal : Unexpected error Unable to cast object of type 'System.String' to type 'System.Data.DataTable'."

------------------------------
aseel odeh
------------------------------
6 REPLIES 6

ewilson
Staff
Staff
Hi @aseelodeh,

Are you referring to the Microsoft Azure Vision skill on the Digital Exchange? If so, which version are you using (v3.0 or v2.1)?​

Cheers,

------------------------------
Eric Wilson
Director, Partner Integrations for Digital Exchange
Blue Prism
------------------------------

Hi @ewilson

I am currently having the same error and I am using version 3.0. Kindly assist.​

------------------------------
Oluwatobiloba Ogunniyi
Programmer
Waje Smart Solution
Africa/Lagos
------------------------------

@ooluwatobiloba,

Can you provide some more details? What action are you calling on the skill? What values are you passing into it? What version of Blue Prism are you using?

Cheers,​

------------------------------
Eric Wilson
Director, Integrations and Enablement
Blue Prism Digital Exchange
------------------------------

@ewilson

I was having the same error. I am using the Microsoft Vision Version 3.0 and using Blue Prism v6.10.2
I was able to get a result when using the action analyze, describe​ and detect but in OCR action, I encountered this error as well.

"Internal : Unexpected error Unable to cast object of type 'System.String' to type 'System.Data.DataTable'."

I am using the calc stage to create a binary data item, LoadBinaryFile(FilePath).
I am passing these parameters.

Resource Name = Westus2
Bearer Token = API key
language = "en"
Image to Analyze = image from the output of calc stage, LoadBinaryFile(FilePath)

------------------------------
Kirby
------------------------------

Hi @jsantiago08,

I'm kind of surprised you're able to get any successful responses on this. I was just looking through and the base URL that's defined in the connector (the URL that your specific resource name is added to) is not correct. According to Microsoft's documentation the base URLs are all of the form <Region>.api.cognitive.microsoft.com. The URL in the connector is <Region>​.cognitiveservices.azure.com. This may have been the older URL and Microsoft just performs a redirect on any requests. Either way, that's not what's causing your issue, but it's something we'll need to address in those connectors.

After looking over the connector, I believe the issue you're seeing is that the wrong Content-Type header has been specified for the action you're trying to perform. That action has the Content-Type header set to application/octet-stream which implies the body of the request is nothing but raw bits and bytes. However, since the action is using the built-in Single File option of the Web API feature I think that header needs to be change to multipart/form-data.

5891.png
Change that, give it a try, and let me know how it works for you.

Cheers,

------------------------------
Eric Wilson
Director, Integrations and Enablement
Blue Prism Digital Exchange
------------------------------

@ewilson
Works for me. Thank you so much for your help.

By the way, do we have available SKILL/BPRelease for MS Cognitive Services Language Understanding?

Thanks again! ​

------------------------------
Kirby
------------------------------