[web2py] Mongodb error in appadmin
The action I have a table/collection with 3 objects In the table this is reverenced as Field('host_id', mdb.hoststable, comment=Like nim or hmc server., label=T('Destination Host ID')), But when in appadmin I select a other object to change then it throws a error. The error Ticket ID 127.0.0.1.2013-03-21.15-46-39.9f2786b5-d69c-4e31-a6c9-dd76f3692e59 type 'exceptions.RuntimeError' uncaught exception when updating rows: MongoDB can only handle up to 8-byte ints Version web2py^(TM) Version 2.4.5-stable+timestamp.2013.03.18.22.46.22 Python Python 2.7.3: /usr/bin/python2.7 (prefix: /usr) Traceback 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. Traceback (most recent call last): File /home/mv1965/Documents/development/eclipse/workspacejuno/w2pdeploy/gluon/restricted.py, line 212, in restricted exec ccode in environment File /home/mv1965/Documents/development/eclipse/workspacejuno/w2pdeploy/applications/adeploy/compiled/controllers_appadmin_update.py, line 410, in module File /home/mv1965/Documents/development/eclipse/workspacejuno/w2pdeploy/gluon/globals.py, line 194, in lambda self._caller = lambda f: f() File /home/mv1965/Documents/development/eclipse/workspacejuno/w2pdeploy/applications/adeploy/compiled/controllers_appadmin_update.py, line 277, in update File /home/mv1965/Documents/development/eclipse/workspacejuno/w2pdeploy/gluon/sqlhtml.py, line 1527, in accepts self.id_field_name]).update(**fields) File /home/mv1965/Documents/development/eclipse/workspacejuno/w2pdeploy/gluon/dal.py, line 9834, in update ret = db._adapter.update(tablename,self.query,fields) File /home/mv1965/Documents/development/eclipse/workspacejuno/w2pdeploy/gluon/dal.py, line 5450, in update raise RuntimeError(uncaught exception when updating rows: %s % e) RuntimeError: uncaught exception when updating rows: MongoDB can only handle up to 8-byte ints -- --- 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/groups/opt_out.
[web2py] Mongodb error in appadmin
Created the following table mdb.define_table('syscommands', Field('commandname', type='string', unique=True, label=T('Commandname')), Field('commandline', type='string', label=T('Command')), Field('host_id', mdb.hoststable, comment=Like nim or hmc server., label=T('Destination Host ID')), Field('description', type='string', label=T('Description')), Field('fase','string', comment=Fase 1 is storage, Fase 2 is Profile Creation, Fase 3 is VIO deployment, Fase 4 is Lpar deployment.., label=T('Fase')), Field('created_on','datetime',default=request.now, label=T('Created On'),writable=False,readable=False), Field('modified_on','datetime',default=request.now, label=T('Modified On'),writable=False,readable=False, update=request.now), format='%(commandname)s', migrate=settings.migrate) # Table rules for command mdb.syscommands.fase.requires = IS_IN_SET(['1', '2', '3', '4']) #mdb.syscommands.host_id.requires = IS_NOT_EMPTY() mdb.syscommands.commandname.requires = IS_NOT_EMPTY() mdb.syscommands.host_id.requires = IS_IN_DB(mdb, 'hoststable.id', 'hoststable.hostname') mdb.syscommands.commandline.requires = IS_NOT_EMPTY() it revers to this table mdb.define_table('hoststable', Field('hostname', type='string', unique=True, label=T('Hostname')), Field('description', type='string', label=T('Description')), Field('netboot', type='string', label=T('Netboot information')), Field('ip', type='string', default='192.168.1.x', label=T('IP Address')), Field('connectcmd', type='string', default='ssh', label=T('Connection command')), Field('useraccount', type='string', default='root', label=T('Default User')), Field('created_on','datetime',default=request.now, label=T('Created On'),writable=False,readable=False), Field('modified_on','datetime',default=request.now, label=T('Modified On'),writable=False,readable=False, update=request.now), format='%(hostname)s', migrate=settings.migrate) # Table Hosts rules mdb.hoststable.hostname.requires = IS_NOT_EMPTY() mdb.hoststable.ip.requires = IS_NOT_EMPTY() Then when I create a record in appadmin and after that change this item It throws this error. Ticket ID 127.0.0.1.2013-03-21.17-03-38.3cfba30b-5706-4bdb-af50-faa6be3ed179 type 'exceptions.RuntimeError' uncaught exception when updating rows: MongoDB can only handle up to 8-byte ints Version web2py^(TM) Version 2.4.5-stable+timestamp.2013.03.18.22.46.22 Python Python 2.7.3: /usr/bin/python2.7 (prefix: /usr) Traceback 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. Traceback (most recent call last): File /home/mv1965/Documents/development/eclipse/workspacejuno/w2pdeploy/gluon/restricted.py, line 212, in restricted exec ccode in environment File /home/mv1965/Documents/development/eclipse/workspacejuno/w2pdeploy/applications/adeploy/compiled/controllers_appadmin_update.py, line 410, in module File /home/mv1965/Documents/development/eclipse/workspacejuno/w2pdeploy/gluon/globals.py, line 194, in lambda self._caller = lambda f: f() File /home/mv1965/Documents/development/eclipse/workspacejuno/w2pdeploy/applications/adeploy/compiled/controllers_appadmin_update.py, line 277, in update File /home/mv1965/Documents/development/eclipse/workspacejuno/w2pdeploy/gluon/sqlhtml.py, line 1527, in accepts self.id_field_name]).update(**fields) File /home/mv1965/Documents/development/eclipse/workspacejuno/w2pdeploy/gluon/dal.py, line 9834, in update ret = db._adapter.update(tablename,self.query,fields) File /home/mv1965/Documents/development/eclipse/workspacejuno/w2pdeploy/gluon/dal.py, line 5450, in update raise RuntimeError(uncaught exception when updating rows: %s % e) RuntimeError: uncaught exception when updating rows: MongoDB can only handle up to 8-byte ints -- --- 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/groups/opt_out.
Re: [web2py] Mongodb error in appadmin
seems to me that a lot of people are interested in using mongodb but really few are contributing back with tests and patches. BTW: you DO know that Mongo generally doesn't play well with joins, right ? Using references in mongodb is not a smart design. -- --- 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/groups/opt_out.
Re: [web2py] Mongodb error in appadmin
Op 21-03-13 17:50, Niphlod schreef: seems to me that a lot of people are interested in using mongodb but really few are contributing back with tests and patches. BTW: you DO know that Mongo generally doesn't play well with joins, right ? Using references in mongodb is not a smart design. Mongodb as far as I know does not have joins :) But it did accept it, so I decided to post the error. But this is mysql database design that I did put over 1 on 1 I have to redo the database design to be nicer to Mongo (I am just looking up to the conversion, even though I now have both databases so its just a matter of writing a copy and past program after I created the new database structure in mongo) . I would love to have some pointers about how though define mongo in db.py in a proper nosql way. Thanks for the remark btw :) -- --- 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/groups/opt_out. -- --- 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/groups/opt_out.
Re: [web2py] Mongodb error in appadmin
I would love to have some pointers about how though define mongo in db.py in a proper nosql way. Could you open an issue at the project page? If you can, please provide: - The relevant part of the model - A possible set of data which would reproduce the error - Your mongodb driver, database server, web2py and Python versions The MongoDB DAL adapter does some automatic type mapping for id fields. I belive the issue could be realted to that. -- --- 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/groups/opt_out.
Re: [web2py] Mongodb error in appadmin
On 03/21/2013 08:06 PM, Alan Etkin wrote: I would love to have some pointers about how though define mongo in db.py in a proper nosql way. Could you open an issue at the project page? Done :-) Issue 1401 https://code.google.com/p/web2py/issues/detail?id=1401: Mongodb error in appadmin If more info needed or some testing is needed just ask. I will play with mongo and web2py anyway. If you can, please provide: - The relevant part of the model - A possible set of data which would reproduce the error - Your mongodb driver, database server, web2py and Python versions The MongoDB DAL adapter does some automatic type mapping for id fields. I belive the issue could be realted to that. -- --- 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/groups/opt_out. -- --- 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/groups/opt_out.