Flask-Web-App-Tutorial icon indicating copy to clipboard operation
Flask-Web-App-Tutorial copied to clipboard

Help me out on this error

Open infawikirich opened this issue 4 years ago • 3 comments

C:\Users\CBAS\AppData\Local\Programs\Python\Python37\lib\site-packages\flask_sqlalchemy_init_.py:834: FSADeprecationWarning: SQLALCHEMY_TRACK_MODIFICATIONS adds significant overhead and will be disabled by default in the future. Set it to True or False to suppress this warning. 'SQLALCHEMY_TRACK_MODIFICATIONS adds significant overhead and ' Traceback (most recent call last): File "C:/Users/CBAS/Documents/Python Scripts/Pycharm/Tech with Tim/main.py", line 9, in app = create_app() File "C:\Users\CBAS\Documents\Python Scripts\Pycharm\Tech with Tim\website_init_.py", line 27, in create_app create_database(app) File "C:\Users\CBAS\Documents\Python Scripts\Pycharm\Tech with Tim\website_init_.py", line 38, in create_database db.create_all(app=app) File "C:\Users\CBAS\AppData\Local\Programs\Python\Python37\lib\site-packages\flask_sqlalchemy_init_.py", line 1039, in create_all self.execute_for_all_tables(app, bind, 'create_all') File "C:\Users\CBAS\AppData\Local\Programs\Python\Python37\lib\site-packages\flask_sqlalchemy_init.py", line 1031, in execute_for_all_tables op(bind=self.get_engine(app, bind), **extra) File "C:\Users\CBAS\AppData\Local\Programs\Python\Python37\lib\site-packages\flask_sqlalchemy_init.py", line 962, in get_engine return connector.get_engine() File "C:\Users\CBAS\AppData\Local\Programs\Python\Python37\lib\site-packages\flask_sqlalchemy_init_.py", line 555, in get_engine options = self.get_options(sa_url, echo) File "C:\Users\CBAS\AppData\Local\Programs\Python\Python37\lib\site-packages\flask_sqlalchemy_init_.py", line 570, in get_options self._sa.apply_driver_hacks(self.app, sa_url, options) File "C:\Users\CBAS\AppData\Local\Programs\Python\Python37\lib\site-packages\flask_sqlalchemy_init.py", line 914, in apply_driver_hacks sa_url.database = os.path.join(app.root_path, sa_url.database) AttributeError: can't set attribute

infawikirich avatar Mar 17 '21 17:03 infawikirich

^^^ i have this exact same issue its something to do with the 'db.create_all(app=app)' but im not sure what

EDIT: found the issue, you have to downgrade your SQLAlchemy type: pip install upgrade SQLAlchemy==1.3.6 in cmd

rustedorc avatar Mar 17 '21 18:03 rustedorc

SQLALCHEMY_TRACK_MODIFICATIONS = False

Add this in your init.py file to resolve this warning

pvr30 avatar May 19 '21 07:05 pvr30

Check_password_hash is not working

Abdoulshehu avatar Jul 08 '21 12:07 Abdoulshehu