Mar-28-2022, 05:31 AM
(Mar-27-2022, 08:11 PM)deanhystad Wrote: In utils.py you have this:
Base = declarative_basedeclaritive_base is a function, so Base = declaritive_base is a function. Base = declaritive_base() calls the function and assigns the result to Base.
You're right, I got rid of the first mistake.
But now I'm getting another error
Error:sqlalchemy.exc.ProgrammingError: (pymysql.err.ProgrammingError) (1146, "Table 'BankApp.users' doesn't exist")
[SQL: INSERT INTO users (user_id, first_name, last_name, email_name, address, phone_number, date_of_birth, join_date) VALUES (%(user_id)s, %(first_name)s, %(last_name)s, %(email_name)s, %(address)s, %(phone_number)s, %(date_of_birth)s, %(join_date)s)]
[parameters: {'user_id': '1234567890123', 'first_name': 'fname', 'last_name': 'lname', 'email_name': '[email protected]', 'address': 'address1', 'phone_number': 757271432, 'date_of_birth': '2000-22-10', 'join_date': datetime.datetime(2022, 3, 28, 8, 27, 3, 742772)}]
(Background on this error at: https://sqlalche.me/e/14/f405)