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

SQLAlchemy error #15

Open
alexgravx opened this issue May 8, 2023 · 1 comment
Open

SQLAlchemy error #15

alexgravx opened this issue May 8, 2023 · 1 comment

Comments

@alexgravx
Copy link

Je suis sur MacOS. Lorsque j'exécute "python run.py" dans le venv, j'ai l'erreur suivante que je n'arrive pas à résoudre:

RuntimeError: A 'SQLAlchemy' instance has already been registered on this Flask app. Import and use that instance instead.

Je remercie d'avance toute aide.

@Jordan-Argyropoulos
Copy link

Jordan-Argyropoulos commented May 15, 2023

Hello,
J'ai commenté le fichier init.py
#############################
import os
from flask import Flask

from .views import app
from . import models

""" Connect sqlalchemy to app """
"""models.db.init_app(app)"""

"""@app.cli.command("init_db")
def init_db():
models.init_db()"""

#########################

j'ai pu après exécuté la commande

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

2 participants