Montreal-Forced-Aligner icon indicating copy to clipboard operation
Montreal-Forced-Aligner copied to clipboard

AttributeError: 'AcousticModel' object has no attribute 'is_tmpdir'

Open benjisympa opened this issue 7 years ago • 10 comments

Good morning,

Thank you for your work. I try for the first time this software, I read the documentation and download pre-trained model for dictionary and language but I don't succeed to launch the alignment. Do you have an idea of this error pls ?

Thanks

✘ maurice@MBP-de-Herve  ~/Downloads/montreal-forced-aligner/bin  ./mfa_align ../data ../pretrained_models/english.dict.txt english ../output Setting up corpus information... Number of speakers in corpus: 1, average number of utterances per speaker: 1.0 Traceback (most recent call last): File "/Users/mmcauliffe/dev/Montreal-Forced-Aligner/aligner/command_line/align.py", line 186, in File "/Users/mmcauliffe/dev/Montreal-Forced-Aligner/aligner/command_line/align.py", line 144, in validate_args File "/Users/mmcauliffe/dev/Montreal-Forced-Aligner/aligner/command_line/align.py", line 139, in align_included_model File "/Users/mmcauliffe/dev/Montreal-Forced-Aligner/aligner/command_line/align.py", line 86, in align_corpus File "/Users/mmcauliffe/dev/Montreal-Forced-Aligner/aligner/models.py", line 37, in init ValueError: '/Users/maurice/Downloads/montreal-forced-aligner/pretrained_models/english.zip' is a bomb. Failed to execute script align Exception ignored in: <object repr() failed> Traceback (most recent call last): File "/Users/mmcauliffe/dev/Montreal-Forced-Aligner/aligner/models.py", line 69, in del AttributeError: 'AcousticModel' object has no attribute 'is_tmpdir' ✘ maurice@MBP-de-Herve  ~/Downloads/montreal-forced-aligner/bin 

benjisympa avatar Dec 05 '17 16:12 benjisympa

Hi, I am getting this same error too! Did you manage to solve this issue?

abdulhalimaliakbar avatar Mar 20 '18 03:03 abdulhalimaliakbar

Solved the issue. Reason was because I did not run the .py script from the master directory (Montreal-Forced-Aligner).

abdulhalimaliakbar avatar Mar 20 '18 07:03 abdulhalimaliakbar

Glad that fixed it for you, I still am not sure what's causing this issue. One person also solved it by redownloading the pretrained model, but both of these are pretty unsatisfying solutions to me.

mmcauliffe avatar Mar 20 '18 17:03 mmcauliffe

I'm encountering the same error, and unfortunately it's for a model I trained myself a while ago. Any progress on this? Suggestions?

Taylors-MacBook-Air-2:montreal-forced-aligner py$ ./bin/mfa_align /Users/py/Desktop/PROJECTS/Junebug/JB/JBTEST/ ./JUNEBUG.dict ./pretrained-models/coraal2_good.zip ~/Desktop/LEE_JUNEBUG_TEST/ -t ./tmpdir Setting up corpus information... Number of speakers in corpus: 1, average number of utterances per speaker: 1.0 Traceback (most recent call last): File "/Users/mmcauliffe/dev/Montreal-Forced-Aligner/aligner/command_line/align.py", line 186, in File "/Users/mmcauliffe/dev/Montreal-Forced-Aligner/aligner/command_line/align.py", line 146, in validate_args File "/Users/mmcauliffe/dev/Montreal-Forced-Aligner/aligner/command_line/align.py", line 86, in align_corpus File "/Users/mmcauliffe/dev/Montreal-Forced-Aligner/aligner/models.py", line 32, in init File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/shutil.py", line 970, in unpack_archive File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/shutil.py", line 874, in _unpack_zipfile shutil.ReadError: ./pretrained-models/coraal2_good.zip is not a zip file Failed to execute script align Exception ignored in: <object repr() failed> Traceback (most recent call last): File "/Users/mmcauliffe/dev/Montreal-Forced-Aligner/aligner/models.py", line 69, in del AttributeError: 'AcousticModel' object has no attribute 'is_tmpdir'

TaylorWJones avatar May 17 '18 20:05 TaylorWJones

@TaylorWJones I have met same error on windows, have you solved it ?

ben-8878 avatar Oct 09 '18 10:10 ben-8878

I have not resolved it

On Tue, Oct 9, 2018 at 6:42 AM v-yunbin [email protected] wrote:

@TaylorWJones https://github.com/TaylorWJones I have met same error on windows, have you solved it ?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/MontrealCorpusTools/Montreal-Forced-Aligner/issues/52#issuecomment-428145274, or mute the thread https://github.com/notifications/unsubscribe-auth/AHyRzRDB36y1vW2w7xDYMPKyuW8FnMG7ks5ujH2MgaJpZM4Q2iL_ .

-- Taylor Jones PhD Candidate, Linguistics, 2019 Benjamin Franklin Fellow, Moore Family Memorial Fellow, University of Pennsylvania

-- Umuntu ufunda aze afe --

TaylorWJones avatar Oct 09 '18 19:10 TaylorWJones

Traceback (most recent call last): File "aligner\command_line\align.py", line 186, in File "aligner\command_line\align.py", line 142, in validate_args File "aligner\command_line\align.py", line 86, in align_corpus File "aligner\models.py", line 32, in init File "shutil.py", line 977, in unpack_archive File "shutil.py", line 877, in _unpack_zipfile shutil.ReadError: \pretrained_models\model_hw_ing.zip is not a zip file [21720] Failed to execute script align Exception ignored in: <object repr() failed> Traceback (most recent call last): File "aligner\models.py", line 69, in del AttributeError: 'AcousticModel' object has no attribute 'is_tmpdir'

I'm getting this error with a model I trained myself. Did anyone ever find a way to fix this? @TaylorWJones @mmcauliffe

ninamarkl avatar Mar 31 '20 14:03 ninamarkl

The argument handling, particularly paths, might be easier. I have encountered this error on Windows, instead of just the name of the zipped pretrained model without the zip extension, as stated in readthedocs, I got it working by entering full path to the zip file, including extension.

comodoro avatar Apr 30 '20 17:04 comodoro

I'm having this problem too, can you say more.Where is the .py.Thank you!

Scx123 avatar Nov 10 '22 07:11 Scx123

@Scx123 I remember having had this error when I specified the model ( in my case, czech) as czech or czech.zip or relative path and fixed it by using absolute path, but I see the code has changed since, so I would first recommend using the latest, if possible, pip install git+https://github.com/MontrealCorpusTools/Montreal-Forced-Aligner.git, or rather, as I see a new version already among pull requests with a commit that heralds fixing of these problems on Windows, wait for the release of 2.0.7 and pip install -U Montreal-Forced-Aligner. There might be away of pip installing directly from the pull request, but you'd have to Research that yourself.

comodoro avatar Nov 10 '22 11:11 comodoro