what of version of web2py do you have? there was one that had this bug
but it was fixed. Make sure you have 1.53.5

Massimo


On Dec 9, 9:26 pm, "Wes James" <[EMAIL PROTECTED]> wrote:
> File "/web2py/applications/cnrsa/models/db.py", line 130, in <module>
>     SQLField("t2id",db.t2_person,default=t2.person_id))
>   File "/web2py/gluon/sql.py", line 568, in define_table
>     raise e
> TypeError: descriptor 'fileno' of 'file' object needs an argument
>
> On Tue, Dec 9, 2008 at 8:03 PM, mdipierro <[EMAIL PROTECTED]> wrote:
>
> > minor correction:
>
> > db.define_table("student",
> >      SQLField("xxx_id",db.t2_person,default=t2.person_id),
>
> > On Dec 9, 8:57 pm, Jose C <[EMAIL PROTECTED]> wrote:
> >> > For now, I have a temp fix by going in to the data base and inserting
> >> > records with just the id and it works fine now.
>
> >> > I'll need to figure out a way to create the student record from at
> >> > least the t2_person name when they do their registration.
>
> >> I think what Massimo was saying is that if you call your field in the
> >> "student" table something else other than "id" (think of it as a
> >> reserved field name), then it will work as you expect.
>
> >> i.e. instead of:
> >> db.define_table("student",
> >>       SQLField("id",default=t2.person_id),
>
> >> try this:
> >> db.define_table("student",
> >>       SQLField("xxx_id",default=t2.person_id),
>
> >> (where xxx is anything you want).
>
> >> HTH,
> >> JC
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to