These are the database tables I defined.I guess the problem is with the
person table only. If I remove the last 4 lines and try to insert values.
They are not getting inserted into the person and it is showing the same
error.
db.define_table('person',
db.Field('name','string',requires=IS_NOT_EMPTY()),
db.Field('date_of_birth','date',requires=IS_NOT_EMPTY()),
db.Field('age','integer',requires=IS_NOT_EMPTY()),
db.Field('gender','string',requires=IS_IN_SET(['male','female'])),
db.Field('mail_address','string',requires=IS_EMAIL()),
db.Field('field_of_expertise','string'),
db.Field('career_objective','text'),
db.Field('webpage','string',requires=IS_NULL_OR(IS_URL())),
db.Field('contact_number1', 'string',requires=IS_NOT_EMPTY()),
db.Field('contact_number2', 'string'),
db.Field('current_location','text'),
db.Field('interests','text'),
db.Field('skills','text'),
db.Field('image','upload'),
db.Field('resume','upload',requires =
IS_NULL_OR(IS_UPLOAD_FILENAME(extension='pdf')),comment='upload in PDF
format'))
db.define_table('education',
db.Field('person_id','reference person'),
db.Field('educational_qualification','string',length=512,requires=IS_NOT_EMPTY()),
db.Field('university','string',requires=IS_NOT_EMPTY()),
db.Field('year_of_graduation','integer',requires=IS_NOT_EMPTY()),
db.Field('CGPA','float',requires=IS_NOT_EMPTY()))
db.define_table('company',
db.Field('homepage','string', requires=IS_NULL_OR(IS_URL())),
db.Field('contact_info','text'))
db.define_table('vacancies',
db.Field('company_id','reference person'),
db.Field('vacancy','string',length=64),
db.Field('educational_qualifications','string',length=512))
db.define_table('experience',
db.Field('person_id','reference person'),
db.Field('employer','string',requires=IS_NOT_EMPTY()),
db.Field('start_date','date'),
db.Field('end_date','date',comment='If still working in here leave
this box blank'),
db.Field('place','string',requires=IS_NOT_EMPTY()),
db.Field('achievements_and_rewards','text'))
db.define_table('project',
db.Field('person_id','reference person'),
db.Field('title','string',requires=IS_NOT_EMPTY()),
db.Field('description','text'),
db.Field('project_file','upload'),
db.Field('wpage','string', requires=IS_NULL_OR(IS_URL())))
db.education.person_id.requires=IS_IN_DB(db.person,'person_id','%(name)s')
db.experience.person_id.requires=IS_IN_DB(db,'person_id','%(name)s')
db.project.person_id.requires=IS_IN_DB(db,'person_id','%(name)s')
db.vacancies.company_id.requires=IS_IN_DB(db,'company_id','%(name)s')
On Friday, March 29, 2013 10:45:57 PM UTC+5:30, [email protected] wrote:
>
> <type 'exceptions.ValueError'>(need more than 1 value to unpack)
>
> I got this weird kind of error and not able to figure out what this means.
>
--
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.