Docker install fails
ItsNoted opened this issue · 2 comments
Here are the logs.
3.9.17
Traceback (most recent call last):
File "/app/app.py", line 17, in <module>
import flask_login
File "/usr/local/lib/python3.9/site-packages/flask_login/__init__.py", line 12, in <module>
from .login_manager import LoginManager
File "/usr/local/lib/python3.9/site-packages/flask_login/login_manager.py", line 4, in <module>
from flask import abort
File "/usr/local/lib/python3.9/site-packages/flask/__init__.py", line 7, in <module>
from .app import Flask as Flask
File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 28, in <module>
from . import cli
File "/usr/local/lib/python3.9/site-packages/flask/cli.py", line 18, in <module>
from .helpers import get_debug_flag
File "/usr/local/lib/python3.9/site-packages/flask/helpers.py", line 16, in <module>
from werkzeug.urls import url_quote
ImportError: cannot import name 'url_quote' from 'werkzeug.urls' (/usr/local/lib/python3.9/site-packages/werkzeug/urls.py)
I'm not entirely certain how you've recreated this error as I once had this error in the early beginnings when making this (url_quote, werkzeug.urls) and I think I had completely removed all instances of it. I believe it had something to do with flask_login requiring version 0.6.2 and no greater, which is less than ideal, and that had solved the issue.
When I get home from work (9-5 job EST), and after I settle in after making dinner, feeding pets, etc. I will recreate a new instance under new names and ports and document each command until I figure it out. I don't believe you're the only user who has had this issue.
Keep requirements.txt the same and perhaps try these commands to clear caches of residual files:
Within the project directory: find . -name "*.pyc" -exec rm -f {} \;
System wide python caches: python -m site --user-site
Have a clean virtual environment, reinstall dependencies, and try again.
If all else fails, wait. I will create a fix.
Created a solution under the 'master' branch. Found free time on my lunch break.
The problem? Coding on lack of sleep, making a solution, then updating only one or two files and not all of them.
Requirements.txt now has Werkzeug as it's supposed to and a few additional downloads that are currently not used in app.py but will be soon so I'm leaving them there for now. I believe Werkzeug had an issue with flask_login on version 0.6.3 and which is why mine is currently 0.6.2 which is what caused the confusion.
Another issue is docker-compose.yml never included redis which is a huge requirement.
Going to forewarn you now.
Do NOT for any circumstance change the container names for ytdl, ytdldb, or ytdlredis. These names are hard coded into app.py and have no configurable options built into the .env file and the app will cause new errors under new names. They will be soon changed to work with an .env file, at some point, but currently the names must stay the same.
I went from debug to final production: clone, edit (steps 1 and 2), to step 3 building with docker than ran a test downloading a random video. All checks out, it works once again! Enjoy.