-
Notifications
You must be signed in to change notification settings - Fork 120
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
The model path exists in Chinese, depthai_demo.py cannot run error #294
Comments
Asking team. Not immediately sure. |
Hi @hello-word-yang |
@hello-word-yang I think what might immediately remedy the issue is setting UTF-8 support in Locale under Windows settings. (Source: https://pete.akeo.ie/2019/11/powershell-script-to-convert-utf-8.html) Otherwise it seems like we have to handle the path as UTF-16 and use wide strings in Windows case... |
Note: The above UTF-8 support is a system wide change and may affect other software running on the computer. I advise to continue with precaution and rollback if undesired side effects show up |
hi, @themarpe Thanks for your reply, I will test the method you mentioned as soon as possible. |
hi, @themarpe After my test, after modifying the encoding format of the system to utf-8, depthai-demo.py can run normally when the model path contains Chinese path. Thank you for the solution. But I think it is better to solve this problem from the code level, because it is impossible for all users to modify the system. |
I agree - I wish Windows will push more into UTF-8 direction, so this won't be a platform dependent thing anymore. |
There is Chinese in my model path, and an error is reported when loading the file model as shown in the figure below.
We found that it was because the std::ifstream method failed to open a file with a Chinese path.
depthai-core/src/pipeline/AssetManager.cpp
Line 32 in 0cc6284
Can you help us solve this problem? thanks.
The text was updated successfully, but these errors were encountered: