Comments (9)
Additional update :
I can see the following error in the function "ProcessImage" logs:
Critical error: No MediaTypeFormatter is available to read an object of type 'OCRResult' from content with media type 'application/octet-stream'.
from mcw-serverless-architecture.
@joelhulen @timahenning Sorry guys for bothering you , But do you have any idea what could be the reason for the error up?
I have tried several things but with no luck
from mcw-serverless-architecture.
@eaelmoneem1 Sorry, I was away on vacation. Cold you please tell me what the value of your computerVisionApiUrl
app setting is?
from mcw-serverless-architecture.
Hi @joelhulen NP, thanks for looking into this.
The value for computerVisionApiUrl is: https://tollboothvisioninitlab.cognitiveservices.azure.com/vision/v2.0/ocr added in the Azure function
from mcw-serverless-architecture.
Thank you. When you look at your other App Settings, do you see the indicator that shows that the Key Vault reference was successfully retrieved? This will be for computerVisionApiKey
, eventGridTopicKey
, cosmosDBAuthorizationKey
, and blobStorageConnection
.
from mcw-serverless-architecture.
I'm not sure exactly from where I can see this, But I think that all the connections are correct because I have modified this part manually and removed the else condition. Just to test that the event for "savePlateData" is working fine, and I was able to see data in CosmosDB "Processed" document but again with empty "licensePlateText" :
if (data.LicensePlateFound)
{
// TODO 3: Modify send method to include the proper eventType name value for saving plate data.
await Send("savePlateData", "TollBooth/CustomerService", data);
}
else
{
// TODO 4: Modify send method to include the proper eventType name value for queuing plate for manual review.
await Send("queuePlateForManualCheckup", "TollBooth/CustomerService", data);
}
and when i check the Function logs in the portal i see this logs for each file:
2020-09-16 12:13:52.738
Executing 'ProcessImage' (Reason='EventGrid trigger fired at 2020-09-16T12:13:51.5869921+00:00', Id=8607afca-fbcf-481c-b8cc-b93d738f007f)
Information
2020-09-16 12:13:53.011
Processing XVK7CDMI.jpg
Information
2020-09-16 12:13:53.196
Making OCR request
Information
2020-09-16 12:13:53.456
Critical error: No MediaTypeFormatter is available to read an object of type 'OCRResult' from content with media type 'application/octet-stream'.
Critical
2020-09-16 12:13:53.462
Finished OCR request. Result:
Information
2020-09-16 12:13:53.475
Sending license plate data to the queuePlateForManualCheckup Event Grid type
Information
2020-09-16 12:13:53.574
Sent the following to the Event Grid topic: TollBooth.Models.Event`1[TollBooth.Models.LicensePlateData]
Information
2020-09-16 12:13:53.575
Finished processing. Detected the following license plate:
Information
2020-09-16 12:13:53.604
Executed 'ProcessImage' (Succeeded, Id=8607afca-fbcf-481c-b8cc-b93d738f007f, Duration=2016ms)
from mcw-serverless-architecture.
Can you please update the GetImageHttpContent
method of the FindLicensePlateText.cs
file (https://github.com/microsoft/MCW-Serverless-architecture/blob/master/Hands-on%20lab/starter/TollBooth/TollBooth/FindLicensePlateText.cs#L103) by replacing content.Headers.ContentType = new MediaTypeHeaderValue("application/octet-stream");
with content.Headers.ContentType = new MediaTypeHeaderValue("application/json");
or text/plain
if that doesn't work?
from mcw-serverless-architecture.
This is strange, I deleted the function from the portal and then I made the changes and published it.
But I keep receiving the same error :
Critical error: No MediaTypeFormatter is available to read an object of type 'OCRResult' from content with media type 'application/octet-stream'.
I have tried (application/json) & (text/plain)
@joelhulen Do you have any idea what else could cause this error in the code if it's not the HeaderValue?
from mcw-serverless-architecture.
The issue has been resolved. The problem was in one of the KeyVault keys.
Thanks for your help
from mcw-serverless-architecture.
Related Issues (20)
- Issue in exercise 7 HOT 13
- Activating the visual studio in VM HOT 2
- Task 2: Run ARM template to provision lab resources HOT 9
- Before the HOL - ObjectId not returned HOT 2
- HOL: Not able to see the generated csv in storage HOT 4
- September 2020 update suggestions HOT 1
- Minor: screen capture of creating a storage account is not up to date anymore
- Enabling Application Insights experience changed
- Could not build tollbooth project from VS. HOT 2
- VS 2019 includes a new Git tool. Instructions in Exercise7 may need to be updated.
- Data is not visible in Cosmos DB HOT 5
- March 2021 update suggestions HOT 3
- Instruction and Screenshot Update HOT 2
- Exercise 2: Task 1: Step 4: Templates not available in TollBoothEvent Function App HOT 9
- Logic App Cannot convert undefined or null to object error HOT 1
- Cosmos DB collections cannot be viewed in the portal HOT 2
- ExportLicensePlate function throws exception on creating response HOT 2
- Deployment center now default to .Net version 4 HOT 1
- Unbale to change .Net version which has set default to v4.0. HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mcw-serverless-architecture.