McCloudS / subgen

Autogenerate subtitles using OpenAI Whisper Model via Jellyfin, Plex, Emby, Tautulli, or Bazarr
MIT License
581 stars 49 forks source link

Setup Troubles on Windows 11 with Jellyfin #28

Closed ARPP3 closed 11 months ago

ARPP3 commented 11 months ago

Issue: Setup Troubles on Windows 11 with Jellyfin

Description

Hey, I am new to this world of Docker and Python. I was trying to follow instructions on Windows 11 to set up Subgen.

Starting with Docker, the image worked fine and was waiting on a webhook. The IP of my container was 172.17.0.2, but unfortunately, I could not ping this IP.

I wanted to switch Docker to use the host network driver, but this feature isn't available on Windows. So, I switched to try and follow the standalone setup instructions for Subgen without Docker in the hopes that I can connect to the webhooks without any network routing. However, I ran into a ton of setup issues.

Console Log

Console Log on Pastebin

I used Conda 23.7.2 to create a new environment. Could this be a version issue with Python/Conda? Are there missing requirements? I don't know what to make of this log or where to begin.

Any help is appreciated. Thank you!

ARPP3 commented 11 months ago

Follow-up: Runtime Error when Importing stable_whisper

I made some progress with the setup by switching the Conda environment to Python 3.11. However, I'm now encountering a runtime error when trying to import stable_whisper. Here's the call stack for the error:

Traceback (most recent call last):
  File "C:\LWRepos\subgen\subgen\subgen.py", line 40, in <module>
    import stable_whisper
  File "C:\Python312\Lib\site-packages\stable_whisper\__init__.py", line 1, in <module>
    from .stabilization import *
  File "C:\Python312\Lib\site-packages\stable_whisper\stabilization.py", line 6, in <module>
    from whisper.tokenizer import Tokenizer
  File "C:\Python312\Lib\site-packages\whisper.py", line 69, in <module>
    libc = ctypes.CDLL(libc_name)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Python312\Lib\ctypes\__init__.py", line 369, in __init__
    if '/' in name or '\\' in name:
       ^^^^^^^^^^^
TypeError: argument of type 'NoneType' is not iterable

*Edit: Hmm, it seems like it's still referencing the .py files in my C:\Python312 folder. I am not sure how to fix this and it's likely just user error because I've not worked with python a lot in the past, not sure where to go from here,

ARPP3 commented 11 months ago

Follow-up: Continued Issues with 'fastapi' Module

I've made some progress in addressing the Python version issue by uninstalling Python 3.12 and downgrading to 3.11. I removed 312 from the system PATH. Additionally, I cleaned the Conda environment and reinstalled the dependencies. However, I'm still encountering a new error:

Traceback (most recent call last):
  File "C:\LWRepos\subgen\subgen\subgen.py", line 37, in <module>
    from fastapi import FastAPI, File, UploadFile, Query, Header, Body, Form, Request
ModuleNotFoundError: No module named 'fastapi'

This error is from line 37, earlier than the previous error which was line 40. So I am not even certain if I'd receive or be able to continue past the TypeError: argument of type 'NoneType' is not iterable error I had before if it comes up again....

Which version of python is this for?

McCloudS commented 11 months ago

The docker runs 3.10, my dev environment runs 3.11. I recommend you go back to the docker and find the correct ip using: docker-machine ls

the ip you were using is dockers internal network and typically isn’t accessible.

McCloudS commented 11 months ago

Your error implies the installation of the packages starting at line 20 is failing since it can’t import fastapi. You could try installing manually and seeing what the errors actually are.

ARPP3 commented 11 months ago

The docker runs 3.10, my dev environment runs 3.11. I recommend you go back to the docker and find the correct ip using: docker-machine ls

the ip you were using is dockers internal network and typically isn’t accessible.

I see! I was using docker desktop so it doesn't have the docker-machine commands. Also it doesn't use virtual box so this could be causing my issues with the network. I will give this all a go, thanks!

ARPP3 commented 11 months ago

Ok! I've got it working. I stopped using anaconda, switched to 3.10, and it's resolved now. Running as expected outside of docker, thank you!