My many-to-many table is throwing an error every time I access that table
in the admin page:
<type 'exceptions.ValueError'> incomplete format
Traceback (most recent call last):
File "/home/apl/Desktop/web2py/gluon/restricted.py", line 217, in
restricted
exec ccode in environment
File "/home/apl/Desktop/web2py/applications/testapp/views/appadmin.html",
line 189, in <module>
</p>
File "/home/apl/Desktop/web2py/gluon/sqlhtml.py", line 2917, in __init__
r = A(represent(field, r, record), _href=str(href))
File "/home/apl/Desktop/web2py/gluon/sqlhtml.py", line 56, in represent
return f(value)
File "/home/apl/Desktop/web2py/gluon/dal.py", line 6966, in repr_ref
def repr_ref(id, row=None, r=referenced, f=ff): return f(r, id)
File "/home/apl/Desktop/web2py/gluon/dal.py", line 6939, in ff
return r._format % row
ValueError: incomplete format
Here is the gist of what I'm trying to do:
db.category.bulk_insert([ {'title':'category1'} ])
db.subcategory.bulk_insert([ {'title':'subcategory1'} ])
# This part will throw an error when visiting the admin page for this table
db.category_subcategory.bulk_insert([ {'category_id':1L,
'subcategory_id':1L} ])
My db has these fields:
category: name Field
subcategory: name Field
category_subcategory: category_id Field, subcategory_id Field.
Why am I getting this error?
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
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.