Comments (12)
@shanmurugan sorry forgot to comeback here and update... i managed to sort it out ....my API had a problem but was able to fix it ...thanks
from cognitive-vision-windows.
Getting the same error in both VS2015 and VS2017. Tried clean, rebuild, build. Tried 2 different valid API keys. Same error.
from cognitive-vision-windows.
Hi folks - can you pull the latest source? The sample app now allows you to specify the endpoint address in addition to the API key. This is necessary because a given API key works only in a single endpoint/region (https://westus.api.cognitive.microsoft.com/vision/v1.0, for example). You can find the correct endpoint address on the Azure portal.
from cognitive-vision-windows.
Nope, still doing it.
You're not passing the URL into the client, and it's hard coded in a few places too.
from cognitive-vision-windows.
I'm also having the same issue.
[12:16:58.056441]: VisionServiceClient is created
[12:16:58.057945]: Calling VisionServiceClient.AnalyzeImageAsync()...
[12:16:58.947496]: Microsoft.ProjectOxford.Vision.ClientException: Exception of type 'Microsoft.ProjectOxford.Vision.ClientException' was thrown.
at Microsoft.ProjectOxford.Vision.VisionServiceClient.HandleException(Exception exception)
at Microsoft.ProjectOxford.Vision.VisionServiceClient.<SendAsync>b__42_1[TRequest,TResponse](Exception e)
at System.AggregateException.Handle(Func`2 predicate)
at Microsoft.ProjectOxford.Vision.VisionServiceClient.<SendAsync>d__42`2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.ProjectOxford.Vision.VisionServiceClient.<AnalyzeImageAsync>d__21`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at CallSite.Target(Closure , CallSite , Object )
at System.Dynamic.UpdateDelegates.UpdateAndExecute1[T0,TRet](CallSite site, T0 arg0)
at Microsoft.ProjectOxford.Vision.VisionServiceClient.<AnalyzeImageAsync>d__19.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
at VisionAPI_WPF_Samples.AnalyzePage.<AnalyzeUrl>d__2.MoveNext() in C:\Projects\Experiments\Cognitive-Vision-Windows\Sample-WPF\AnalyzePage.xaml.cs:line 117
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
at VisionAPI_WPF_Samples.AnalyzePage.<DoWork>d__3.MoveNext() in C:\Projects\Experiments\Cognitive-Vision-Windows\Sample-WPF\AnalyzePage.xaml.cs:line 145
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
at VisionAPI_WPF_Samples.ImageScenarioPage.<ShowPreviewAndDoWork>d__15.MoveNext() in C:\Projects\Experiments\Cognitive-Vision-Windows\Sample-WPF\ImageScenarioPage.cs:line 90
from cognitive-vision-windows.
Few places, you find these line in common among all .cs files
VisionServiceClient VisionServiceClient = new VisionServiceClient(SubscriptionKey)
Just replace it with
VisionServiceClient VisionServiceClient = new VisionServiceClient(SubscriptionKey, "https://westcentralus.api.cognitive.microsoft.com/vision/v1.0");
But the above endpoint is subjected to change for the zone you have subscribed vision api
from cognitive-vision-windows.
Hi Shanmurugan,
Am still getting the above error even after using that endpoint
from cognitive-vision-windows.
@luthercrop Could you upload/send me the code snippet alone ?.
from cognitive-vision-windows.
I have encountered this error after multiple builds..please resolve..
[15:17:20.828295]: VisionServiceClient is created
[15:17:20.911300]: Calling VisionServiceClient.AnalyzeImageAsync()...
[15:17:50.338983]: Microsoft.ProjectOxford.Vision.ClientException: Exception of type 'Microsoft.ProjectOxford.Vision.ClientException' was thrown.
at Microsoft.ProjectOxford.Vision.VisionServiceClient.HandleException(Exception exception)
at Microsoft.ProjectOxford.Vision.VisionServiceClient.b__42_1[TRequest,TResponse](Exception e)
at System.AggregateException.Handle(Func2 predicate) at Microsoft.ProjectOxford.Vision.VisionServiceClient.<SendAsync>d__42
2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.ProjectOxford.Vision.VisionServiceClient.d__211.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.ProjectOxford.Vision.VisionServiceClient.<AnalyzeImageAsync>d__20.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter
1.GetResult()
at VisionAPI_WPF_Samples.AnalyzePage.d__1.MoveNext() in C:\Users\Mr\Desktop\vision-windows\Sample-WPF\AnalyzePage.xaml.cs:line 86
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
at VisionAPI_WPF_Samples.AnalyzePage.d__3.MoveNext() in C:\Users\Mr\Desktop\vision-windows\Sample-WPF\AnalyzePage.xaml.cs:line 141
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
at VisionAPI_WPF_Samples.ImageScenarioPage.d__15.MoveNext() in C:\Users\Mr\Desktop\vision-windows\Sample-WPF\ImageScenarioPage.cs:line 90
from cognitive-vision-windows.
yes just repmace by this code
Just replace it with
VisionServiceClient VisionServiceClient = new VisionServiceClient(SubscriptionKey, "https://westcentralus.api.cognitive.microsoft.com/vision/v1.0");
from cognitive-vision-windows.
Similar issue, fixed it here https://github.com/itorian/Cognitive-Vision-Windows
from cognitive-vision-windows.
please reactivate if setting the endpoint does not solve your situation
from cognitive-vision-windows.
Related Issues (20)
- The WPF app raises a ClientException HOT 13
- WPF Sample app doesn't build HOT 1
- Solution is looking for SampleUserControlLibrary HOT 1
- WPF sample builds and runs but throws exception on Analyze HOT 8
- How to retrieve landmarks HOT 2
- Merge this repo with https://github.com/Microsoft/Cognitive-Vision-DotNetCore and .net standard for client libraries
- Fail to build in VS 2015. HOT 1
- SampleUserControlLibrary doesn't exist HOT 1
- API endpoint should be configurable HOT 4
- Analyze image with domain model throws exception HOT 4
- The WPF sample is missing the Control library HOT 4
- sample WPF won't build HOT 2
- customized endpoint in the main window not used in wpf_sample HOT 1
- Text extraction doesn't work for white writing on over a photo, but does if you invert the colors and resubmit. HOT 2
- Default Sample Images unavailable
- Link to newer sample leads to 404 HOT 1
- This repo is missing important files HOT 1
- Cannot Build - Missing SampleUerControlLibrary project HOT 4
- Computer Vision API (Analyze an image) not giving proper responses for machinery HOT 2
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 cognitive-vision-windows.