Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SEHException: External component has thrown an exception. #5

Closed
gerrymcjr opened this issue Sep 10, 2018 · 4 comments
Closed

SEHException: External component has thrown an exception. #5

gerrymcjr opened this issue Sep 10, 2018 · 4 comments

Comments

@gerrymcjr
Copy link

Hi i am trying out facerecognition of yours both on console app and web application. I am doing a simple get the distance of two photos on both console and web application here is a more detailed error

[System.Runtime.InteropServices.SEHException (0x80004005): External component has thrown an exception.

at DlibDotNet.ShapePredictor.Native.deserialize_shape_predictor(Byte[] filName)

at DlibDotNet.ShapePredictor.Deserialize(String path)

at FaceRecognitionDotNet.FaceRecognition..ctor(String directory)

at FaceRecognitionDotNet.FaceRecognition.Create(String directory)

at WebApplication2.Pages.IndexModel.OnGet() in C:\Users\user\Source\Repos\WebApplication2\WebApplication2\Pages\Index.cshtml.cs:line 17

at Microsoft.AspNetCore.Mvc.RazorPages.Internal.ExecutorFactory.VoidHandlerMethod.Execute(Object receiver, Object[] arguments)

at Microsoft.AspNetCore.Mvc.RazorPages.Internal.PageActionInvoker.InvokeHandlerMethodAsync()

at Microsoft.AspNetCore.Mvc.RazorPages.Internal.PageActionInvoker.InvokeNextPageFilterAsync()

at Microsoft.AspNetCore.Mvc.RazorPages.Internal.PageActionInvoker.Rethrow(PageHandlerExecutedContext context)

at Microsoft.AspNetCore.Mvc.RazorPages.Internal.PageActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)

at Microsoft.AspNetCore.Mvc.RazorPages.Internal.PageActionInvoker.InvokeInnerFilterAsync()

at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeNextResourceFilter()

at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Rethrow(ResourceExecutedContext context)

at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)

at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeFilterPipelineAsync()

at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeAsync()

at Microsoft.AspNetCore.Builder.RouterMiddleware.Invoke(HttpContext httpContext)

at Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware.Invoke(HttpContext context)

at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)](url)

@gerrymcjr
Copy link
Author

i am sorry it was never an issue at all my bad i downloaded the shape_predictor_68_face_landmarks.dat but it wasn't complete i downloaded it again everything is working fine thank you

@Seth-Julien-de-Lampon
Copy link

I get same error When I use:

var directory = Path.GetFullPath("models");
FaceRecognition.Create(directory);

I downloaded the .dat files again, but same error occurs.
Anyone any idea what I can try next?

@takuya-takeuchi
Copy link
Owner

hi, could you show me the model file full path?
Dlib uses std::string rather than std::wstring.
so it contains certain character and it could fail searching file.

@Seth-Julien-de-Lampon
Copy link

hi, could you show me the model file full path?
Dlib uses std::string rather than std::wstring.
so it contains certain character and it could fail searching file.

This was exactly it, thanks! Had the 'ë' character somewhere in there. Working perfectly now!

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

No branches or pull requests

3 participants