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

Werkzeug version and docker-compose #21

Open
soaska opened this issue Mar 10, 2024 · 0 comments
Open

Werkzeug version and docker-compose #21

soaska opened this issue Mar 10, 2024 · 0 comments

Comments

@soaska
Copy link

soaska commented Mar 10, 2024

Hello, default requirements give this error:

Traceback (most recent call last):
  File "/home/sosiska/ChatGPT-Discord-Bot/main.py", line 12, in <module>
    from src.server import keep_alive
  File "/home/sosiska/ChatGPT-Discord-Bot/src/server.py", line 2, in <module>
    from flask import Flask
  File "/home/sosiska/ChatGPT-Discord-Bot/venv/lib64/python3.9/site-packages/flask/__init__.py", line 5, in <module>
    from .app import Flask as Flask
  File "/home/sosiska/ChatGPT-Discord-Bot/venv/lib64/python3.9/site-packages/flask/app.py", line 30, in <module>
    from werkzeug.urls import url_quote
ImportError: cannot import name 'url_quote' from 'werkzeug.urls' (/home/sosiska/ChatGPT-Discord-Bot/venv/lib64/python3.9/site-packages/werkzeug/urls.py)

Added Werkzeug version to requirements:

openai==0.26.5
requests==2.28.2
discord.py==2.1.1
python-dotenv==0.21.1
Flask==2.2.3
Werkzeug==2.2.2

Now it works :)

and in docker-cmopose its better to replace ports to 8080 cuz flask app uses 8080 and you dont configure it in .env:

version: "3"

services:
  app:
    container_name: discord-chatgpt-ai-assistant
    build: .
    restart: always
    ports:
      - "8080:8080"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant