Skip to content
This repository has been archived by the owner on Nov 8, 2021. It is now read-only.

What cause the error with code 404 ? #37

Closed
wang3t opened this issue Aug 26, 2017 · 6 comments
Closed

What cause the error with code 404 ? #37

wang3t opened this issue Aug 26, 2017 · 6 comments

Comments

@wang3t
Copy link

wang3t commented Aug 26, 2017

  1. Clone the repo.
  2. Insert subscription key for the Face API MPOAppDelegate.h (Verified @ 5)
  3. re-run pop install @ Cognitive-Face-iOS/Example
  4. run on device but seeing error while it detecting face at
    • (void)detectAction: (id)sender {
      => [client detectWithData:data returnFaceId:YES ....] completionBlock:^() { ... }
      }
  5. Verified EndPoint/Key
    EndPpoin:https://westus.api.cognitive.microsoft.com/face/v1.0;
    KEY:xxxx

error NSError * domain: @"POFaceServiceClient error - http response is not success : { "statusCode": 404, "message": "Resource not found" }" - code: 404 0x00000001c4251f70

  1. Before the error, there is another log
    ... ProjectOxfordFace_Example[299:14136] [discovery] errors encountered while discovering extensions: Error Domain=PlugInKit Code=13 "query cancelled" UserInfo={NSLocalizedDescription=query cancelled}

Q: What cause the error with code 404 ?
Am I missing something (UserInfo?)

@huxuan
Copy link
Contributor

huxuan commented Aug 26, 2017

@wang3t It seems that you missed the trailing slash and at the end of endpoint.

@wang3t
Copy link
Author

wang3t commented Aug 26, 2017

Found the issue, missing the closing "/".
Modified : EndPpoin:https://westus.api.cognitive.microsoft.com/face/v1.0/

Closing.

@MrMit007
Copy link

missing the closing "/"
It saved my life ;p

@PiyalGeorge
Copy link

In python simply this worked for me.
ENDPOINT='https://westcentralus.api.cognitive.microsoft.com'

@theCuriousHAT
Copy link

Even after putting slash in my endpoint at the end, I am still facing the issue.

Encountered exception. (404) Resource not found

@roninstar
Copy link

I am having the same issue as well using the exact example and in westus and using the trailing "/" yet still I keep getting 404 Resource not found using Cognitive Services. I tried creating from Endpoint and from Subscription with the same error.
string subscriptionKey = _azuresubscriptionKey;
string region = _azureRegion;
var azureSpeechServiceUri = new Uri(_azureSpeechServicesPath);
// var config = SpeechConfig.FromSubscription(subscriptionKey, region);

        var config = SpeechConfig.FromEndpoint(azureSpeechServiceUri, subscriptionKey);
        config.SpeechRecognitionLanguage = "en-us";
        
        // persist profileMapping if you want to store a record of who the profile is
        var profileMapping = new Dictionary<string, string>();
        await VerificationEnroll(config, profileMapping);

The createProfileAsync always returns an empty Profile Id.

var client = new VoiceProfileClient(config);
var profile = await client.CreateProfileAsync(VoiceProfileType.TextIndependentVerification, "en-us");

        var audioInput = AudioConfig.FromDefaultMicrophoneInput();
            
                CurrentInstructions.Text = $"Enrolling profile id {profile.Id}.";
        // give the profile a human-readable display name
       
                profileMapping.Add(profile.Id, "Mark");

                VoiceProfileEnrollmentResult result = null;
                while (result is null || result.RemainingEnrollmentsSpeechLength > TimeSpan.Zero)
                {
                    CurrentInstructions.Text = "Continue speaking to add to the profile enrollment sample.";
                    result = await client.EnrollProfileAsync(profile, audioInput);
                    CurrentInstructions.Text = $"Remaining enrollment audio time needed: {result.RemainingEnrollmentsSpeechLength}";
                    
                }

                if (result.Reason == ResultReason.EnrolledVoiceProfile)
                {
                    await SpeakerVerify(config, profile, profileMapping);
                }
                else if (result.Reason == ResultReason.Canceled)
                {
                    var cancellation = VoiceProfileEnrollmentCancellationDetails.FromResult(result);
                    CurrentInstructions.Text = $"CANCELED {profile.Id}: ErrorCode={cancellation.ErrorCode} ErrorDetails={cancellation.ErrorDetails}";
                }

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants