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 'src' #142

Open
dalanmiller opened this issue Apr 12, 2023 · 0 comments
Open

No module named 'src' #142

dalanmiller opened this issue Apr 12, 2023 · 0 comments
Labels
type/bug Issue or PR related to a bug

Comments

@dalanmiller
Copy link

Provide environment information

Running docker compose with latest from master

docker --version
Docker version 23.0.3, build 3e7cbfd
whisper-api:
      build:
          context: ~/repos/WAAS
          # use Dockerfile.gpu when using a NVIDIA GPU
          # dockerfile: Dockerfile
      ports:
          - "3000:3000"
      volumes:
          - .:/workspace
      depends_on:
          - whisper-redis
      environment:
          - BASE_URL=<URL>
          - EMAIL_SENDER_ADDRESS=<EMAIL>
          - EMAIL_SENDER_PASSWORD=<PASSWORD> 
          - EMAIL_SENDER_HOST=<HOST>
          - DISCLAIMER='No disclaimer disclaimed'
          - ALLOWED_WEBHOOKS_FILE="allowed_webhooks.json"
      command: gunicorn -w 2 -b 0.0.0.0:3000 --log-file=- 'src.main:app'
      labels:
        - "traefik.enable=true"
        - "traefik.http.routers.whisper.rule=Host(`<HOST>`)"
        - "traefik.http.routers.whisper.EntryPoints=https"
        - "traefik.http.routers.whisper.service=whisper"
        - "traefik.http.routers.whisper.tls.certresolver=cloudflare"
        - "traefik.http.routers.whisper.middlewares=compress@docker"
        - "traefik.http.services.whisper.loadbalancer.server.port=3000"
  whisper-worker:
      build:
          context: ~/repos/WAAS
          # use Dockerfile.gpu when using a NVIDIA GPU
          # dockerfile: Dockerfile
      volumes:
          - .:/workspace
      depends_on:
          - whisper-redis
      environment:
          - BASE_URL=<URL>
          - EMAIL_SENDER_ADDRESS=<EMAIL>
          - EMAIL_SENDER_PASSWORD=<PASSWORD> 
          - EMAIL_SENDER_HOST=<HOST>
          - DISCLAIMER='No disclaimer disclaimed'
          - ALLOWED_WEBHOOKS_FILE="allowed_webhooks.json"
      command: rq worker --url redis://whisper-redis:6379 -c worker-settings
  whisper-redis:
      image: redis
      ports:
          - "6379:6379"

Which area(s) of the code does the issue occur in?

Api

To Reproduce

Uncertain what information is helpful here.

Describe the Bug

This is the output after starting up the api service:

docker-whisper-api-1  | [2023-04-12 22:42:53 +0000] [1] [INFO] Starting gunicorn 20.1.0
docker-whisper-api-1  | [2023-04-12 22:42:53 +0000] [1] [INFO] Listening at: http://0.0.0.0:3000 (1)
docker-whisper-api-1  | [2023-04-12 22:42:53 +0000] [1] [INFO] Using worker: sync
docker-whisper-api-1  | [2023-04-12 22:42:53 +0000] [7] [INFO] Booting worker with pid: 7
docker-whisper-api-1  | [2023-04-12 22:42:53 +0000] [7] [ERROR] Exception in worker process
docker-whisper-api-1  | Traceback (most recent call last):
docker-whisper-api-1  |   File "/usr/local/lib/python3.10/site-packages/gunicorn/arbiter.py", line 589, in spawn_worker
docker-whisper-api-1  |     worker.init_process()
docker-whisper-api-1  |   File "/usr/local/lib/python3.10/site-packages/gunicorn/workers/base.py", line 134, in init_process
docker-whisper-api-1  |     self.load_wsgi()
docker-whisper-api-1  |   File "/usr/local/lib/python3.10/site-packages/gunicorn/workers/base.py", line 146, in load_wsgi
docker-whisper-api-1  |     self.wsgi = self.app.wsgi()
docker-whisper-api-1  |   File "/usr/local/lib/python3.10/site-packages/gunicorn/app/base.py", line 67, in wsgi
docker-whisper-api-1  |     self.callable = self.load()
docker-whisper-api-1  |   File "/usr/local/lib/python3.10/site-packages/gunicorn/app/wsgiapp.py", line 58, in load
docker-whisper-api-1  |     return self.load_wsgiapp()
docker-whisper-api-1  |   File "/usr/local/lib/python3.10/site-packages/gunicorn/app/wsgiapp.py", line 48, in load_wsgiapp
docker-whisper-api-1  |     return util.import_app(self.app_uri)
docker-whisper-api-1  |   File "/usr/local/lib/python3.10/site-packages/gunicorn/util.py", line 359, in import_app
docker-whisper-api-1  |     mod = importlib.import_module(module)
docker-whisper-api-1  |   File "/usr/local/lib/python3.10/importlib/__init__.py", line 126, in import_module
docker-whisper-api-1  |     return _bootstrap._gcd_import(name[level:], package, level)
docker-whisper-api-1  |   File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
docker-whisper-api-1  |   File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
docker-whisper-api-1  |   File "<frozen importlib._bootstrap>", line 992, in _find_and_load_unlocked
docker-whisper-api-1  |   File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
docker-whisper-api-1  |   File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
docker-whisper-api-1  |   File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
docker-whisper-api-1  |   File "<frozen importlib._bootstrap>", line 1004, in _find_and_load_unlocked
docker-whisper-api-1  | ModuleNotFoundError: No module named 'src'
docker-whisper-api-1  | [2023-04-12 22:42:53 +0000] [7] [INFO] Worker exiting (pid: 7)
docker-whisper-api-1  | [2023-04-12 22:42:53 +0000] [1] [INFO] Shutting down: Master
docker-whisper-api-1  | [2023-04-12 22:42:53 +0000] [1] [INFO] Reason: Worker failed to boot.

Expected Behavior

I expect the service to begin running.

@dalanmiller dalanmiller added the type/bug Issue or PR related to a bug label Apr 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Issue or PR related to a bug
Projects
None yet
Development

No branches or pull requests

1 participant