Ensure that the path fed to MediaPipe contains only ASCII characters#1419
Ensure that the path fed to MediaPipe contains only ASCII characters#1419jorpelae wants to merge 1 commit intohomuler:masterfrom
Conversation
|
@homuler Do you think this can be merged? |
|
Sorry for the delay, I forgot to check this 🙇♂️ |
| if (PathHasNonAsciiChars(filePath)) | ||
| { | ||
| string tempFilePath = Path.Combine(Path.GetTempPath(), Path.GetFileName(filePath)); | ||
| File.Copy(filePath, tempFilePath, true); |
There was a problem hiding this comment.
If we end up implementing a workaround on the C# side, it might make sense to change the _CacheRoot value so that the path contains only ASCII characters, since PathAsResourceFile is not expected to have side effects.
Thank you for your time for looking into this. |
|
I managed to fix the bug on the C++ side ( #1424 ), so I'm going to close this PR. |
Fix for #1284
MediaPipe seems to fail to load assets from folders containing Japanese characters on Windows. After debugging the C++ side, couldn't find any obvious problem without going into MediaPipe itself.
As a workaround, I added a step to check if the asset path contains non-ASCII characters, and if this is the case, make a copy to a temporary path.