Skip to content
This repository was archived by the owner on Mar 16, 2026. It is now read-only.
This repository was archived by the owner on Mar 16, 2026. It is now read-only.

Python problems when deploying the container fresh #80

@Samurai1201

Description

@Samurai1201

When I set up Metatube completly fresh, I experienced this error and couldnt figure out why it comes up.
I used this docker run command:

docker run \
  -d \
  --name metatube \
  --restart always \
  -p 6376:5000 \
  -e PORT=5000 \
  -e HOST=0.0.0.0 \
  -v /(exchanged path)/metatube/downloads:/downloads:rw \
  -v /(exchanged path)/metatube/database:/database:rw \
  -v /(exchanged path)/metatube/migrations:/config/migrations \
  jvt038/metatube:latest

This is the error message I always got:

Traceback (most recent call last):

  File "//config/metatube.py", line 9, in <module>

    app = create_app()

  File "/config/metatube/__init__.py", line 46, in create_app

    init_db(app)

  File "/config/metatube/init/__init__.py", line 11, in init

    default.init_db()

  File "/config/metatube/init/create.py", line 72, in init_db

    self.migrations()

  File "/config/metatube/init/create.py", line 80, in migrations

    stamp(directory)

  File "/usr/local/lib/python3.9/site-packages/flask_migrate/__init__.py", line 111, in wrapped

    f(*args, **kwargs)

  File "/usr/local/lib/python3.9/site-packages/flask_migrate/__init__.py", line 259, in stamp

    command.stamp(config, revision, sql=sql, tag=tag)

  File "/usr/local/lib/python3.9/site-packages/alembic/command.py", line 671, in stamp

    script.run_env()

  File "/usr/local/lib/python3.9/site-packages/alembic/script/base.py", line 569, in run_env

    util.load_python_file(self.dir, "env.py")

  File "/usr/local/lib/python3.9/site-packages/alembic/util/pyfiles.py", line 98, in load_python_file

    raise ImportError("Can't find Python file %s" % path)

ImportError: Can't find Python file /config/migrations/env.py

I hope you can help me find my mistake, thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions