Rubiksman78/RenAI-Chat

Can't open run.bat

Closed this issue · 6 comments

Hey hey,

Been trying to set this up for good 3 hours now, but unfortunately running into the following issue. When I run run.bat - I get this output.

C:\AI\RenAi\RenAI-Chat>run.bat
Requirement already satisfied: numpy==1.23.0 in c:\python\lib\site-packages (1.23.0)
Traceback (most recent call last):
  File "C:\AI\RenAi\RenAI-Chat\main.py", line 8, in <module>
    from tts_api import my_TTS
  File "C:\AI\RenAi\RenAI-Chat\tts_api.py", line 3, in <module>
    from TTS.utils.manage import ModelManager
  File "C:\AI\RenAi\RenAI-Chat\TTS\TTS\utils\manage.py", line 11, in <module>
    from TTS.config import load_config
  File "C:\AI\RenAi\RenAI-Chat\TTS\TTS\config\__init__.py", line 10, in <module>
    from TTS.config.shared_configs import *
  File "C:\AI\RenAi\RenAI-Chat\TTS\TTS\config\shared_configs.py", line 5, in <module>
    from trainer import TrainerConfig
  File "C:\python\lib\site-packages\trainer\__init__.py", line 3, in <module>
    from trainer.model import *
  File "C:\python\lib\site-packages\trainer\model.py", line 4, in <module>
    import torch
  File "C:\python\lib\site-packages\torch\__init__.py", line 139, in <module>
    raise err
OSError: [WinError 126] The specified module could not be found. Error loading "C:\python\lib\site-packages\torch\lib\torch_python.dll" or one of its dependencies.

I ran into multiple issues before getting to this and I think I messed up some of the package dependencies (while trying to fix previous issues). Looks like there is an error with "torch" package. Top 5 StackOverflow google results for similar problem didn't help.

Apologies if this is something obvious, I am not super technical when it comes to stuff like this.
Hope you can help!

Thank you!

Did you use the already built python from the drive or did you install the packages yourself?

Thanks for the reply!

The output in the post above is installing the package manually. Now that you mentioned, I have tried the pre-built python from the drive and I am running into a different issue. Hope this one would be easier to troubleshoot. Here is a short video recording showing explaining the errors I get: https://www.youtube.com/watch?v=S_9IHzOFk4Y

I explain everything in the video, but if you need to reference any outputs shown in the video, I have also copy-pasted them below.

Apologies if I am missing something obvious! Happy to move past my issues with the manual installation issues (as there could be many things that I did wrong). I would really appreciate if you could help me troubleshoot the issue with the prebuilt package version of the game.

As I was saying the video, after I extract pre-built package downloaded from google drive and open run.bat - I get following error. I assume, this is because it is trying to look for "chatbot_module" folder, thats not included in the google drive package.

C:\RenAi\RenAI-Chat-v1.0>run.bat
Requirement already satisfied: numpy==1.23.0 in c:\renai\renai-chat-v1.0\libs\pythonlib\lib\site-packages (1.23.0)
Traceback (most recent call last):
  File "main.py", line 14, in <module>
    from login_screen import CONFIG
  File "C:\RenAi\RenAI-Chat-v1.0\login_screen.py", line 64, in <module>
    all_models = os.listdir("chatbot_models")
FileNotFoundError: [WinError 3] The system cannot find the path specified: 'chatbot_models'

If I manually create the 'chatbot_models' and try running run.bat again - I get a different error:

C:\RenAi\RenAI-Chat-v1.0>run.bat
Requirement already satisfied: numpy==1.23.0 in c:\renai\renai-chat-v1.0\libs\pythonlib\lib\site-packages (1.23.0)
Traceback (most recent call last):
  File "main.py", line 14, in <module>
    from login_screen import CONFIG
  File "C:\RenAi\RenAI-Chat-v1.0\login_screen.py", line 66, in <module>
    chat_menu = tk.OptionMenu(other_frame, chat_model, *all_models)
TypeError: __init__() missing 1 required positional argument: 'value'

I assume, that this is happening because the model is missing from the 'chatbot_models' folder. So, when I copy pygmalion-2.7b into it, I get the following error output:

C:\RenAi\RenAI-Chat-v1.0>run.bat
Requirement already satisfied: numpy==1.23.0 in c:\renai\renai-chat-v1.0\libs\pythonlib\lib\site-packages (1.23.0)
Traceback (most recent call last):
  File "main.py", line 14, in <module>
    from login_screen import CONFIG
  File "C:\RenAi\RenAI-Chat-v1.0\login_screen.py", line 82, in <module>
    voice_menu = tk.OptionMenu(other_frame, voice_sample_coqui, *all_voices_coquiai)
TypeError: __init__() missing 1 required positional argument: 'value'


For the first errors, as you guessed, it is simply because you didn't download any chatbot models and put it in the chatbot_models. It is possible that it was forgotten in the prebuilt version but it is present on the Github, maybe running update.bat should fix it.

As for the last one, it is because there are no voice samples in the folder coquiai_audios, I will fix that to make it so that you don't really need a voice sample if you don't use TTS.

For a temporary solution, you can just put a dummy dummy.wav file in it.

Thank you, that did the trick! You also need to have at least one character in the char_json folder.

Also, I noticed that RenPy crashes unless you add bg.jpg and char.png to "*\RenAIChat-1.0-pc\game\images" folder of the game.

I managed to get to this screen with both buttons greyed out and no field for text entry :
image

Any ideas what could be the fix for this? Thanks again

It might be an issue in Renpy with the way these buttons call the text event in the file char_buttons.rpy line 42 and line 55 with action Replay("chatting_text") or action Replay("voice_chat").

There is sometimes a weird issue with this function Replay that blocks the event. Replacing it with Jump might work but it will send the user back to the title screen, I still have to find a better way of doing this.

I've updated the Renpy files in Releases, that should do the fix. Also included default bg and char png to avoid startup error.
Previous error about empty folders for voices should be fix too in 7625cb0