Skip to content
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

perl uroman exit status 2 #273

Open
Saccarab opened this issue Nov 18, 2024 · 8 comments
Open

perl uroman exit status 2 #273

Saccarab opened this issue Nov 18, 2024 · 8 comments

Comments

@Saccarab
Copy link

Traceback (most recent call last):
  File "C:\Users\User\Documents\GitHub\whisper-diarization\diarize.py", line 172, in <module>
    tokens_starred, text_starred = preprocess_text(
  File "C:\Users\User\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\ctc_forced_aligner\text_utils.py", line 220, in preprocess_text
    tokens = get_uroman_tokens(norm_text, language)
  File "C:\Users\User\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\ctc_forced_aligner\text_utils.py", line 164, in get_uroman_tokens
    result = subprocess.run(
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.3056.0_x64__qbz5n2kfra8p0\lib\subprocess.py", line 526, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['perl', 'C:\\Users\\User\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python310\\site-packages\\ctc_forced_aligner\\uroman\\bin\\uroman.pl', '-l', 'eng']' returned non-zero exit status 2.

and when I directly try to run the script to see what is the issue

perl C:\\Users\\User\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python310\\site-packages\\ctc_forced_aligner\\uroman\\bin\\uroman.pl
Can't locate NLP/Chinese.pm in @INC (you may need to install the NLP::Chinese module) (@INC contains: /c/Users/User/Documents/GitHub/whisper-diarization/../lib /usr/lib/perl5/site_perl /usr/share/perl5/site_perl /usr/lib/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib/perl5/core_perl /usr/share/perl5/core_perl) at C:\Users\User\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\ctc_forced_aligner\uroman\bin\uroman.pl line 23.
BEGIN failed--compilation aborted at C:\Users\User\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\ctc_forced_aligner\uroman\bin\uroman.pl line 23

I followed the windows instructions here

@homelab-00
Copy link

Again this looks like a 'perl' issue. How did you install 'perl'? Did you use Strawberry Perl? If so, did you use the .msi installer or the portable zip?
Also bear in mind that after installing 'perl' it's a good idea to restart your system before trying to run the installation script that uses it. At a minimum, you need to restart the terminal.

@Saccarab
Copy link
Author

yup, I used strawberry perl through .msi and I did restart after

@homelab-00
Copy link

homelab-00 commented Nov 18, 2024

Try to run perl -v in the terminal. What do you see?

Edit: Also look in your PATH. Does it include these entries?
C:\Strawberry\c\bin
C:\Strawberry\perl\site\bin
C:\Strawberry\perl\bin

@Saccarab
Copy link
Author

$ perl -v

This is perl 5, version 36, subversion 0 (v5.36.0) built for x86_64-msys-thread-multi

Copyright 1987-2022, Larry Wall

Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.

Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl".  If you have access to the
Internet, point your browser at https://www.perl.org/, the Perl Home Page.

@homelab-00
Copy link

It seems you're using an older version of 'perl' - yours is 5.36.0 while the latest from the site is 5.40.0.1
Try installing the newest version to see if it helps.

@Saccarab
Copy link
Author

weirdly enough the .msi I used is indeed strawberry-perl-5.40.0.1-64bit.msi

@Saccarab
Copy link
Author

git bash was using its bundled perl apparently that is why I got 5.36.0, using another terminal did it

@homelab-00
Copy link

homelab-00 commented Nov 18, 2024

weirdly enough the .msi I used is indeed strawberry-perl-5.40.0.1-64bit.msi

Lol some of the issues that come up can really make you scratch your head.

It could be a previous 'perl' installation interfering. I'd suggest completely uninstalling Strawberry Perl, rebooting, checking the PATH to make sure there are no entries left behind, reinstalling Strawberry, checking the PATH to make sure the new entries are correctly added, rebooting again and finally running perl -v to see if the correct version has been installed.

Edit:

git bash was using its bundled perl apparently that is why I got 5.36.0, using another terminal did it

I knew it was something stupid like that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants