Giter VIP home page Giter VIP logo

Comments (12)

luthercrop avatar luthercrop commented on May 20, 2024 2

@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.

stephenohair avatar stephenohair commented on May 20, 2024

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.

cthrash avatar cthrash commented on May 20, 2024

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.

imaji avatar imaji commented on May 20, 2024

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.

MMasey avatar MMasey commented on May 20, 2024

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.

shanmurugan avatar shanmurugan commented on May 20, 2024

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.

luthercrop avatar luthercrop commented on May 20, 2024

Hi Shanmurugan,
Am still getting the above error even after using that endpoint

from cognitive-vision-windows.

shanmurugan avatar shanmurugan commented on May 20, 2024

@luthercrop Could you upload/send me the code snippet alone ?.

from cognitive-vision-windows.

yaswanthpalaghat avatar yaswanthpalaghat commented on May 20, 2024

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__422.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.TaskAwaiter1.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.

SEBEIIMED avatar SEBEIIMED commented on May 20, 2024

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.

itorian avatar itorian commented on May 20, 2024

Similar issue, fixed it here https://github.com/itorian/Cognitive-Vision-Windows

from cognitive-vision-windows.

cthrash avatar cthrash commented on May 20, 2024

please reactivate if setting the endpoint does not solve your situation

from cognitive-vision-windows.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.