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

No module named regex #203

Open
Lod3 opened this issue Dec 31, 2024 · 1 comment
Open

No module named regex #203

Lod3 opened this issue Dec 31, 2024 · 1 comment

Comments

@Lod3
Copy link

Lod3 commented Dec 31, 2024

I am trying to translate an extracted srt file from an mkv into english.
I have used the setup script for claude
And tried to install regex module separately
I cannot open the gui nor the command line version:

 λ claude-subtrans "C:\Users\lode_\Videos\Transcriptiopns\ariaferma.srt" --target_language english
Traceback (most recent call last):
  File "C:\Users\lode_\gpt-subtrans\scripts\claude-subtrans.py", line 9, in <module>
    from scripts.subtrans_common import InitLogger, CreateArgParser, CreateOptions, CreateTranslator, CreateProject
  File "C:\Users\lode_\gpt-subtrans\scripts\subtrans_common.py", line 7, in <module>
    from PySubtitle.Helpers.Parse import ParseNames
  File "C:\Users\lode_\gpt-subtrans\PySubtitle\Helpers\__init__.py", line 5, in <module>
    import regex
ModuleNotFoundError: No module named 'regex' 

Any advice?

@machinewrapped
Copy link
Owner

regex should be installed by the setup script, it is listed in requirements.txt. It's about the first import that isn't a built-in Python module, so if it can't be found the script is probably running in a different environment to the one it installed to.

There should be a folder named envsubtrans in the project root if the install was successful - it is a virtual environment, where the dependencies are installed.

If it isn't there, try running install again and check for errors in the output. If it is there, try deleting it and running install again!

Once the folder is definitely present, be sure to launch the app with the .cmd/.sh file created by the install script (it looks like you are from the log) as they activate the virtual environment before running the Python script, which should make sure it can find the dependency modules.

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