Error while saving to database-Flask-Python-Planetscale

Hi,
Firstly thank you for your response to my earlier question.
With reference to the Jovian Project (Flask-Python -Planetscale database)
I was able to develop the website in entirety except for the last part of saving the applicant details to the database. I get an exception.
TypeError: cannot convert dictionary update sequence element #0 to a sequence

Code snippet to save to the database :
#save the applicant details into database
def save_job_application_db(id,application):
with engine.connect() as conn:
querystring=text(“insert into applications(job_id,full_name,email,linkedinurl,education,work_experience,resume_url) values (:job_id,:full_name,:email,:linkedinurl,:education,:work_experience,:resume_url)”)

thedata={‘job_id’:id,‘full_name’:application[‘full_name’],‘email’:application[‘email’],‘linkedinurl’:application[‘linkedin’],‘education’:application[‘education’],‘work_experience’:application[‘experience’],‘resume_url’:application[‘resumeurl’]}

conn.execute(querystring,thedata).all()

Can you please suggest where the code is not working properly.

Regards
TSR

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.