How to fix Error 404 Resource not Found in Custom Vision API
Pranith Saravanan
5
Reputation points
I am trying to train an Azure Custom Vision model by following the instructions on this Learn page: Quickstart: Create an image classification project with the Custom Vision client library or REST API using Java.
When I finally try to run the Gradle build, I am getting the below error
Exception in thread "main" com.microsoft.azure.cognitiveservices.vision.customvision.training.models.CustomVisionErrorException: Status code 404, {"error":{"code":"404","message": "Resource not found"}}
I am getting this error specifically in the following line:
Project project=createProject(trainClient);
The createProject function which I have taken from the Learn page I linked earlier is:
public static Project createProject(CustomVisionTrainingClient trainClient)
{
Trainings trainer=trainClient.trainings();
System.out.println("Creating Project");
Project project=trainer.createProject().withName("Moon-Phases-Trainer").execute();
return project;
}
The line that is causing an issue in specific in the function is
Project project=trainer.createProject().withName("Moon-Phases-Trainer").execute();
Please let me what is causing this error and how to resolve it.
Thank you
Sign in to answer