I encountered error while running one of the files while working with SQL Alchemy. Can anyone resolve it for me please?

Viewed 16

I got a few errors of this kind.

<main.User object at 0x000001E6B97F2C40>

What does it mean? What should I do to fix this error? Please can anyone let me know?

Here is the code:

from main import User, Session, engine

users=[

    {
        "username": "amita",
        "email": "amita@company.com"
    },
    {"username": "pranavi",
    "email": "pranavi@company.com"
     },
    {"username": "harathi",
    "email": "harathi@company.com"
     },
    {"username": "fatima",
    "email": "fatima@company.com"
     },
    {"username": "srini",
    "email": "srini@company.com"
     },
    {"username": "tarun",
    "email": "tarun@company.com"
     },
    
]

local_session=Session(bind=engine)
'''
#new_user=User(username="hari", email="hari@gmail.com")

#local_session.add(new_user)
#local_session.commit()
'''


for u in users:
    new_user = User(username=u["username"], email=u["email"])
    print(new_user)
0 Answers
Related