Closed snowzhangy closed 5 years ago
I do not have a windows machine to test it... But few stuff you can do:
phonemize --version
? Or the version()
function in the main.py
.espeak -ven-us --ipa=3 -q -f test.txt
from command line? (put 'Hello World' in test.txt
I'm having the same issue. The command will fail if there are spaces in any of the paths to begin with, but even without I meet the same error as @snowzhangy:
subprocess.CalledProcessError: Command
'['D:\\Users\\Corentin\\Documents\\Utilities\\CLI\\espeak.exe', '-ven-us', '--ipa=3',
'-q', '-f', 'C:\\Users\\Valiox\\AppData\\Local\\Temp\\tmp76tt0mot']'
returned non-zero exit status 1.
(breaks added for readability)
Running that identical command in CLI but on another text file works without issues.
I guess something is wrong with NamedTemporaryFile
on windows, because using a regular file works fine.
Indeed from Python doc they say: Whether the name can be used to open the file a second time, while the named temporary file is still open, varies across platforms (it can be so used on Unix; it cannot on Windows NT or later).
I'm working on a fix.
I pushed a commit in the branch issue21.
As I said I do not have Windows so I cannot check myself. Could you please test if the bug is fixed on that branch and let me know?
Thanks.
The idea is to use tmpfile.close()
instead of tmpfile.seek(0)
Yep, that fixes it 👍
Thanks, merged into master
when i run phonemize on windows 10 , python 3.6 i still have issue. it looks the temp file doesn't created at all. (the backslash issue fixed i can see)