I'm pretty sure that newly_inserted_id = db.table.insert(...)
should return an integer, not a row. On Wednesday, July 1, 2015 at 4:01:19 PM UTC+2, Sean Ballow wrote: > > We are connecting successfully to MySQL on RDS > > And when attempting to insert a new record it appears to properly insert > into the database and we receive an ID back, for instance > > result = db.foo.insert(myfield='blah') > > print result > >> 1 > > The problem occurs when performing the following after successfully > inserting a record and committing it > > result.as_dict() > >> TypeError: 'NoneType' object is not callable > > result is a ROW instance and the following continues to work > > print result.id > >> 1 > > however as_dict() fails only when connected to MySQL on RDS and not when > using the MySQL local instance > > Oddly enough when I use the same application connected to a locally > running instance of MySQL we do not receive the exception and everything > works as desired. > > Any ideas what may be causing the disparity between a connection to a > local MySQL instance and a MySQL RDS instance? I have compared system > variables between both databases and was unable to identify a problem > > Thanks for your help > > -- 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 web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.