Open saurabhksinha900 opened 4 years ago
Same here. I don't think anyone is maintaining this repo anymore.
Same here. I don't think anyone is maintaining this repo anymore.
Same error isn't working for me either :( did you find a solution to it?
I too facing the same exact issue,did any one of you fixed it,if so please reply with working solution thanks in advance
The solution that worked for me:
dotnet add package Microsoft.Azure.CognitiveServices.Vision.CustomVision.Training --version 2.0.0
this will update the CustomVision package.TrainingApi trainingApi = new TrainingApi() { ApiKey = trainingKey };
with this line CustomVisionTrainingClient trainingApi = new CustomVisionTrainingClient(new Microsoft.Azure.CognitiveServices.Vision.CustomVision.Training.ApiKeyServiceClientCredentials(trainingKey)) {Endpoint = ENDPOINT};
makesure to replace ENDPOINT
with your yours from customvision.ai
C:\Users\saurabh.sinha\Downloads\AISchoolTutorials-master\AISchoolTutorials-master\sketch2code\Import>dotnet run
Unhandled Exception: Microsoft.Rest.HttpOperationException: Operation returned an invalid status code 'Unauthorized' at Microsoft.Azure.CognitiveServices.Vision.CustomVision.Training.TrainingApi.GetDomainsWithHttpMessagesAsync(Dictionary`2 customHeaders, CancellationToken cancellationToken) at Microsoft.Azure.CognitiveServices.Vision.CustomVision.Training.TrainingApiExtensions.GetDomainsAsync(ITrainingApi operations, CancellationToken cancellationToken) at Microsoft.Azure.CognitiveServices.Vision.CustomVision.Training.TrainingApiExtensions.GetDomains(ITrainingApi operations) at Import.Program.Main(String[] args) in C:\Users\saurabh.sinha\Downloads\AISchoolTutorials-master\AISchoolTutorials-master\sketch2code\Import\Program.cs:line 29