You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I Installed phonemizer and espeak in docker container by
$ pip install phonemizer
$ apt-get update && apt-get upgrade -y
$ apt-get install espeak
When I try to run any function related to phonemizer, the following error message appears.
Exception ignored in: <finalize object at 0x7f08c6529a20; dead>
Traceback (most recent call last):
File "/opt/conda/envs/lee/lib/python3.8/weakref.py", line 566, in call
return info.func(*info.args, **(info.kwargs or {}))
File "/opt/conda/envs/lee/lib/python3.8/site-packages/phonemizer/backend/espeak/api.py", line 116, in _delete
shutil.rmtree(tempdir)
File "/opt/conda/envs/lee/lib/python3.8/shutil.py", line 722, in rmtree
onerror(os.rmdir, path, sys.exc_info())
File "/opt/conda/envs/lee/lib/python3.8/shutil.py", line 720, in rmtree
os.rmdir(path)
OSError: [Errno 39] Directory not empty: '/tmp/tmpw4cld8sd'
And Some files pile up in /tmp folder.
Phonemizer version
phonemizer-3.0.1
available backends: espeak-1.48.3, segments-2.2.0
uninstalled backends: espeak-mbrola, festival
System
Ubuntu 20.04
To reproduce
$ phonemize --version
Expected behavior
tmp/tmp[~~] folder is deleted without error message
Additional context
Is it a file delete permission issue?
The text was updated successfully, but these errors were encountered:
Hi, I guess you are using a base docker image like "anaconda" or "miniconda"? In those images, the user has restricted privileges. Try to define the environment variable TMPDIR to a path where you have rw permission.
You can try something like TMPDIR=$HOME echo "hello" | phonemize -b espeak -l en-us
Thank you, I have created a temp directory for espeak in root, so now TMPDIR=/root/tmp_espeak and it now works using this command echo "hello" | phonemize -b espeak -l en-us from terminal, but when I use espeak backend from python phonemes = phonemize(text, language='en-us', backend='espeak', strip=True, preserve_punctuation=True, with_stress=True) I get the same error again error OSError: [Errno 39] Directory not empty: '/home/model-server/tmp/tmp9q8e_44b'
this is not clear to me, you created /root/tmp_espeak but the error is about /home/model-server/tmp. From Python do you have TMPDIR defined in os.environ? You should, and it must point to a folder where the user running Python have read/write permission.
Describe the bug
I Installed phonemizer and espeak in docker container by
$ pip install phonemizer
$ apt-get update && apt-get upgrade -y
$ apt-get install espeak
When I try to run any function related to phonemizer, the following error message appears.
Exception ignored in: <finalize object at 0x7f08c6529a20; dead>
Traceback (most recent call last):
File "/opt/conda/envs/lee/lib/python3.8/weakref.py", line 566, in call
return info.func(*info.args, **(info.kwargs or {}))
File "/opt/conda/envs/lee/lib/python3.8/site-packages/phonemizer/backend/espeak/api.py", line 116, in _delete
shutil.rmtree(tempdir)
File "/opt/conda/envs/lee/lib/python3.8/shutil.py", line 722, in rmtree
onerror(os.rmdir, path, sys.exc_info())
File "/opt/conda/envs/lee/lib/python3.8/shutil.py", line 720, in rmtree
os.rmdir(path)
OSError: [Errno 39] Directory not empty: '/tmp/tmpw4cld8sd'
And Some files pile up in /tmp folder.
Phonemizer version
phonemizer-3.0.1
available backends: espeak-1.48.3, segments-2.2.0
uninstalled backends: espeak-mbrola, festival
System
Ubuntu 20.04
To reproduce
$ phonemize --version
Expected behavior
tmp/tmp[~~] folder is deleted without error message
Additional context
Is it a file delete permission issue?
The text was updated successfully, but these errors were encountered: