Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8357743
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T10:34:44+00:00 2026-06-09T10:34:44+00:00

I have this class: class Contract(db.Model): book_number = db.IntegerProperty(required = True) initial_page = db.IntegerProperty(required

  • 0

I have this class:

class Contract(db.Model):
    book_number = db.IntegerProperty(required = True)
    initial_page = db.IntegerProperty(required = True)
    final_page = db.IntegerProperty(required = True)
    contract_type = db.StringProperty(required = True)
    parties = db.ListProperty(str)
    date = db.DateTimeProperty (required = True, auto_now = True, auto_now_add = True)

And at this line of my code:

 contract.parties = old_parties.append([str(person_id), person_condition])

From this block:

        (...)
        party = []
        contract_record = Contract(book_number = int(numBook),
                                   initial_page = int(numInitialPage),
                                   final_page = int(numFinalPage),
                                   contract_type = choosed_contract_type,
                                   parties = party)
        contract_record.put()
        contract_key = contract_record.key()
        contract_id = contract_record.key().id()

        submit_button = self.request.get('submit_button')

        if submit_button:
            if (person_name and valid_name(person_name)) and (user_SSN and valid_SSN(user_SSN)):
                person_record = Person(person_name = person_name,
                nacionality = user_nacionality,
                profession = user_profession,
                marital_status = user_marital_status,
                driver_license = int(user_driver_license),
                SSN = int(user_SSN),
                address = address)
                person_record.put()
                person_key = person_record.key()
                person_id = person_record.key().id()

                contract = Contract.get_by_id(contract_id)
                old_parties = contract.parties
                contract.parties = old_parties.append([str(person_id), person_condition])
                contract.put()

I got this error:

 File "C:\Users\Py\Desktop\contract\main.py", line 351, in post
    contract.parties = old_parties.append([str(person_id), person_condition])
  File "C:\Program Files (x86)\Google\google_appengine\google\appengine\ext\db\__init__.py", line 614, in __set__
    value = self.validate(value)
  File "C:\Program Files (x86)\Google\google_appengine\google\appengine\ext\db\__init__.py", line 3435, in validate
    value = super(ListProperty, self).validate(value)
  File "C:\Program Files (x86)\Google\google_appengine\google\appengine\ext\db\__init__.py", line 641, in validate
    raise BadValueError('Property %s is required' % self.name)
BadValueError: Property parties is required

My goal is: create an object contract with a empty list in its parties property. After that, I’d like to append new lists [person_id, person_condition] to that empty list, this way: [ [person_id, person_condition], [person_id2, person_condition2],...]

I’d like to know what is producing this error and how to fix it to achieve my goal.

Thanks for any help!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T10:34:46+00:00Added an answer on June 9, 2026 at 10:34 am

    I’m not sure if this is what’s causing the GAE engine you see, but append appends to the list in place and returns None. So you want to do contract.parties.append([str(person_id), person_condition]). The way you are doing it, you wind up setting contract.parties to None.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this class: class Contract(db.Model): book_number = db.IntegerProperty(required = True) initial_page = db.IntegerProperty(required
I have this two classes: class Person(db.Model): person_name = db.StringProperty(required = True) #gender =
I have this database in GAE: class Contract(db.Model): # I renamed Act as Contract
Within my model I have defined a required field class like this: class Contact(models.Model):
I have this class which i would like to map: public class Contract {
I have a simple model for a contract: public class Contract { public int
Hi I have models like this : public class Person extends Model { ...
I have a model like this. #models.py class Payment(models.Model): unit_price = models.DecimalField(max_digits=12, decimal_places=2) discount
I have these tables: class Contract(models.Model): project = models.ForeignKey(Project) start_date = models.DateField() agreed_contacts =
I have the following model : class Contract { string ContractID{get;set;} ICollection<Part> Parts{get;set;} }

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.