TypeError: SQLAlchemy.create_all() got an unexpected keyword argument 'app'

Hi,

I have been trying to run this code by itsron143 on PyCharm, but I am having difficult with making the db.sql file work.

I have been executing this on the terminal, but always getting this error:

Python 3.11.9 (main, Apr 19 2024, 11:44:45) [Clang 14.0.6 ] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from scitec import db, create_app
>>> db.create_all(app=create_app())
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: SQLAlchemy.create_all() got an unexpected keyword argument 'app'
>>> 

As a result, I can’t add new workouts.
What am I doing wrong?

Thank you!

Hi,

see if this helps:

1 Like

Thanks, Paul! :slight_smile: