-
Notifications
You must be signed in to change notification settings - Fork 104
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
Processing local file fails if the path contains certain unicode characters #35
Comments
Good to know, thanks for the detailed report! Not sure how to fix this right now but seems like a pretty serious bug; hopefully I'll get a chance to look into it sometime. |
I'm able to reproduce this on macOS as well. Processing a file in a folder named |
I'm not sure it is the same issue, but I found an issue related to locale of a child process. To reproduct this on mac with CLI : $ pwd
/Users/soyu/git/stemroller
$ echo $LANG
ko_KR.UTF-8
$ PATH=$PWD/mac-extra-files/ThirdPartyApps/demucs-cxfreeze:$PWD/mac-extra-files/ThirdPartyApps/ffmpeg/bin demucs-cxfreeze 한.mp3 -n htdemucs_ft -j 1 --repo $PWD/anyos-extra-files/Models
# ... no UnicodeEncodeError
$ export LANG=""
$ PATH=$PWD/mac-extra-files/ThirdPartyApps/demucs-cxfreeze:$PWD/mac-extra-files/ThirdPartyApps/ffmpeg/bin demucs-cxfreeze 한.mp3 -n htdemucs_ft -j 1 --repo $PWD/anyos-extra-files/Models
...
UnicodeEncodeError: 'ascii' codec can't encode character '\ud55c' in position 17: ordinal not in range(128) To workaround this, you could add next line to processQueue.cjs Line 68 : const CHILD_PROCESS_ENV = {
CUDA_PATH: process.env.CUDA_PATH,
PATH: process.env.PATH,
TEMP: process.env.TEMP,
TMP: process.env.TMP,
LANG: "ko_KR.UTF-8" // added system locale
} Another workaround is modifying L134 instead : curChildProcess = childProcess.spawn(command, args, {
cwd,
env: {
...process.env,
...CHILD_PROCESS_ENV
},
}) But it will not work when it is launched with the app icon on mac. I think that the right direction is to use |
Thanks @mmx900 - your fix was added in #59 but waiting for the build to complete so we can test launching it from the app icon. I tried using |
Closing since nobody has commented about this issue recently. Please reopen if you run into the same error. Thanks mmx900 for your suggestion - it seems to have solved the issue. |
If I try to load a local file, which has the character
ű
anywhere in its path, then the splitting process fails.It seems like characters starting from U+0100 (character code 256) are causing the problem:
Ā
(U+0100),ā
(U+0101), etc. doesn't work, butÿ
(U+00FF) andþ
(U+00FE) works.Tested on windows, with the following paths:
X:\ű\test.mp3
, andX:\ű.mp3
Console output:
The relevant part is probably this line:
UnicodeEncodeError: 'charmap' codec can't encode character '\u0171' in position 20: character maps to <undefined>
The text was updated successfully, but these errors were encountered: