I did a simple import of 'copy' and that got me by that first problem. But now I have the following problem:
db.define_table('Person_certification',Field('Person', db.Person),...Field('Pending', 'boolean', default = False),...I get the following error on the line that defines field 'Pending' (and this is the first 'boolean' type in the file):<type 'exceptions.KeyError'> 'pending'
I have not changed the underlying MySQL db yet; all the booleans are still char(1). Do I need to change them first to Tinyint(1)? I tried that; same error.Thanks.
On Monday, September 17, 2012 9:21:37 AM UTC-6, MichaelF wrote:
Thanks. However, I refer to that field with upper case in all places. Can you tell me where the lower case 'pending' comes from? The field name has always been defined as upper case, and the app has been working up until I made that latest change. So I went into the db and changed the field name to start with lower case, then changed the model file to make it lower-case 'pending'. That worked, but now the next boolean field in the db.py file has an upper-case/lower-case problem. The field is "Length_is_yards" in both the db.py file and the db, and has been that way for weeks, and we've been through several db migrations for the past several weeks (not sure about on those particular tables, though). Now I get the KeyError as shown above, but this time it's for field 'length_is_yards'. It looks to me that web2py is assuming it's lower case.One of my migrations last week was the "fake_migrate_all=True" type; don't know if that's relevant.
Also, in the .database file the field name is Length_is_yards (leading "L" is capital), as is the field name in the MySQL db.I'm confused.
Michael
1. | Traceback (most recent call last): |