Re: [web2py] Re: MongoDB
https://github.com/web2py/web2py/issues On Monday, November 19, 2018 at 10:08:52 AM UTC-5, Lovedie JC wrote: > > how and where do I open this issue? > Regards > > On Mon, 19 Nov 2018 at 17:46, Anthony wrote: > >> web2py sets cacheable=True for queries it does in the IS_IN_DB validator >> as well as in SQLFORM.grid. Please open an issue about this. >> >> Anthony >> >> On Monday, November 19, 2018 at 8:22:21 AM UTC-5, Lovedie JC wrote: >>> >>> I've gone through the code and I haven't done any caching in selects but >>> still getting the message. >>> >>> On Mon, 12 Nov 2018, 18:04 Leonel Câmara wrote: >>> Don't use cache and cacheable in your selects. -- 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. >>> -- >> 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. >> > -- 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.
Re: [web2py] Re: MongoDB
how and where do I open this issue? Regards On Mon, 19 Nov 2018 at 17:46, Anthony wrote: > web2py sets cacheable=True for queries it does in the IS_IN_DB validator > as well as in SQLFORM.grid. Please open an issue about this. > > Anthony > > On Monday, November 19, 2018 at 8:22:21 AM UTC-5, Lovedie JC wrote: >> >> I've gone through the code and I haven't done any caching in selects but >> still getting the message. >> >> On Mon, 12 Nov 2018, 18:04 Leonel Câmara wrote: >> >>> Don't use cache and cacheable in your selects. >>> >>> -- >>> 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. >>> >> -- > 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. > -- 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.
Re: [web2py] Re: MongoDB
web2py sets cacheable=True for queries it does in the IS_IN_DB validator as well as in SQLFORM.grid. Please open an issue about this. Anthony On Monday, November 19, 2018 at 8:22:21 AM UTC-5, Lovedie JC wrote: > > I've gone through the code and I haven't done any caching in selects but > still getting the message. > > On Mon, 12 Nov 2018, 18:04 Leonel Câmara wrote: > >> Don't use cache and cacheable in your selects. >> >> -- >> 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. >> > -- 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.
Re: [web2py] Re: MongoDB
I've gone through the code and I haven't done any caching in selects but still getting the message. On Mon, 12 Nov 2018, 18:04 Leonel Câmara Don't use cache and cacheable in your selects. > > -- > 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. > -- 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.
Re: [web2py] Re: MongoDB
Yes, I did! Thanks for the advice. But submodule when cloning web2py still doesn't work. Best regards, 2015-05-07 16:25 GMT-03:00 Paolo Valleri paolo.vall...@gmail.com: update your local copy of pydal, there are several updates regarding mongo in master branch Paolo 2015-05-07 21:14 GMT+02:00 José Ricardo Borba jrborba...@gmail.com: Allright! Updating pymongo to version 3.0 solves this up! Now I take care of the mongo time / pydal issue! Thanks a lot. 2015-05-07 9:05 GMT-03:00 Paolo Valleri paolo.vall...@gmail.com: You should use pymongo 3.0 On Wednesday, May 6, 2015 at 2:38:56 PM UTC+2, José Borba wrote: I'm very busy in these days, but I tried to start a new installation from the ground (to test the TIME issue with Mongodb in pydal #170), but even without this correction (i.e, with plain web2py clone from github) I receive the below error message. I'm simply copy the application folder to the new installation (side-by-side with welcome and examples). With CLI client (mongo) everything works fine. The welcome app works fine. I see that pydal tries to connect 5 times. The string to connect to mongo is fine (since is a local install. In production will have an user and a password too...). Version web2py™ Version 2.10.4-stable+timestamp.2015.04.26.09.05.21 Traceback Traceback (most recent call last): File /home/mydir/w2p210b/gluon/restricted.py, line 227, in restricted exec ccode in environment File /home/mydir/w2p210b/applications/rastreamento/models/db.py http://localhost:8000/admin/default/edit/rastreamento/models/db.py, line 12, in module db = DAL('mongodb://localhost/telemet', pool_size=0, lazy_tables=True) File /home/mydir/w2p210b/gluon/packages/dal/pydal/base.py, line 174, in __call__ obj = super(MetaDAL, cls).__call__(*args, **kwargs) File /mydir/w2p210b/gluon/packages/dal/pydal/base.py, line 459, in __init__ raise RuntimeError(Failure to connect, tried %d times:\n%s % (attempts, tb)) RuntimeError: Failure to connect, tried 5 times: Traceback (most recent call last): File /home/mydir/w2p210b/gluon/packages/dal/pydal/base.py, line 437, in __init__ self._adapter = ADAPTERS[self._dbname](**kwargs) File /home/mydir/w2p210b/gluon/packages/dal/pydal/adapters/base.py, line 57, in __call__ obj = super(AdapterMeta, cls).__call__(*args, **kwargs) File /home/mydir/w2p210b/gluon/packages/dal/pydal/adapters/mongo.py, line 58, in __init__ from pymongo.write_concern import WriteConcern File /home/mydir/w2p210b/gluon/custom_import.py, line 108, in custom_importer return NATIVE_IMPORTER(name, globals, locals, fromlist, level) ImportError: No module named write_concern Best regards, -- José Ricardo Borba -- 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. -- José Ricardo Borba -- 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 a topic in the Google Groups web2py-users group. To unsubscribe from this topic, visit https://groups.google.com/d/topic/web2py/3q5CfUSPQ1o/unsubscribe. To unsubscribe from this group and all its topics, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- 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. -- José Ricardo Borba -- 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.
Re: [web2py] Re: MongoDB
Allright! Updating pymongo to version 3.0 solves this up! Now I take care of the mongo time / pydal issue! Thanks a lot. 2015-05-07 9:05 GMT-03:00 Paolo Valleri paolo.vall...@gmail.com: You should use pymongo 3.0 On Wednesday, May 6, 2015 at 2:38:56 PM UTC+2, José Borba wrote: I'm very busy in these days, but I tried to start a new installation from the ground (to test the TIME issue with Mongodb in pydal #170), but even without this correction (i.e, with plain web2py clone from github) I receive the below error message. I'm simply copy the application folder to the new installation (side-by-side with welcome and examples). With CLI client (mongo) everything works fine. The welcome app works fine. I see that pydal tries to connect 5 times. The string to connect to mongo is fine (since is a local install. In production will have an user and a password too...). Version web2py™ Version 2.10.4-stable+timestamp.2015.04.26.09.05.21 Traceback Traceback (most recent call last): File /home/mydir/w2p210b/gluon/restricted.py, line 227, in restricted exec ccode in environment File /home/mydir/w2p210b/applications/rastreamento/models/db.py http://localhost:8000/admin/default/edit/rastreamento/models/db.py, line 12, in module db = DAL('mongodb://localhost/telemet', pool_size=0, lazy_tables=True) File /home/mydir/w2p210b/gluon/packages/dal/pydal/base.py, line 174, in __call__ obj = super(MetaDAL, cls).__call__(*args, **kwargs) File /mydir/w2p210b/gluon/packages/dal/pydal/base.py, line 459, in __init__ raise RuntimeError(Failure to connect, tried %d times:\n%s % (attempts, tb)) RuntimeError: Failure to connect, tried 5 times: Traceback (most recent call last): File /home/mydir/w2p210b/gluon/packages/dal/pydal/base.py, line 437, in __init__ self._adapter = ADAPTERS[self._dbname](**kwargs) File /home/mydir/w2p210b/gluon/packages/dal/pydal/adapters/base.py, line 57, in __call__ obj = super(AdapterMeta, cls).__call__(*args, **kwargs) File /home/mydir/w2p210b/gluon/packages/dal/pydal/adapters/mongo.py, line 58, in __init__ from pymongo.write_concern import WriteConcern File /home/mydir/w2p210b/gluon/custom_import.py, line 108, in custom_importer return NATIVE_IMPORTER(name, globals, locals, fromlist, level) ImportError: No module named write_concern Best regards, -- José Ricardo Borba -- 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. -- José Ricardo Borba -- 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.
Re: [web2py] Re: MongoDB adapter
YAY Everything is working FINE! Thank you very much, Paolo, Massimo and others. Cheers. 2015-05-04 10:39 GMT-03:00 Ron Chatterjee achatterjee...@gmail.com: What is mongodb adapter? Where do I find that info? On Monday, May 4, 2015 at 8:39:48 AM UTC-4, Paolo Valleri wrote: It should be fixed in trunk Paolo On Saturday, May 2, 2015 at 1:24:32 PM UTC+2, José Borba wrote: OK. Thank you very much again. Cheers. 2015-05-02 8:22 GMT-03:00 Paolo Valleri paolo@gmail.com: Open an issue to don't forget it,I'll fix it in the next few days Paolo On May 2, 2015 1:18 PM, José Ricardo Borba jrbor...@gmail.com wrote: Paolo, Thank you for you quickly response. But I'm working with the latest web2py/Pydal 2.10.4 (downloaded 2.10.3 and updated). I forgot to mention this. I'm sorry. My second bet is that the parser of time (the time_itens above) need to be modified to work with time in mongo, Still not knowing what is the correct bug (if there are one) to report. Cheers, 2015-05-02 4:23 GMT-03:00 Paolo Valleri paolo@gmail.com: Hi, try use the latest version of pydal, Mongo adapter has been recently updated to work with pymongo 3.0 However, I think this is a bug. Can you open a bug report on https://github.com/web2py/pydal Paolo On Saturday, May 2, 2015 at 3:58:13 AM UTC+2, José Borba wrote: Hi 4 All, I'm new to mongoDB and still having some problems with a TIME field. When I set a TIME field in the table, fill the input field of a sqlform (only time is allowed) and send the data to table, all the record is inserted without any warning. But when I try to show in the sqlform, I receive a message: pre code Traceback (most recent call last): File /home/xxx.../applications/ras/controllers/appadmin.py, line 269, in select *fields, limitby=(start, stop)) File /home/xxx.../gluon/packages/dal/pydal/objects.py, line 2026, in select return adapter.select(self.query,fields,attributes) File /home/xxx.../gluon/packages/dal/pydal/adapters/mongo.py, line 353, in select result = processor(rows, fields, newnames, False) File /home/xxx.../gluon/packages/dal/pydal/adapters/base.py, line 1596, in parse value = self.parse_value(value,ft,blob_decode) File /home/xxx.../gluon/packages/dal/pydal/adapters/base.py, line 1450, in parse_value return self.parsemap[key](value,field_type) File /home/xxx.../gluon/packages/dal/pydal/adapters/base.py, line 1472, in parse_time time_items = map(int,str(value)[:8].strip().split(':')[:3]) ValueError: invalid literal for int() with base 10: '2000-01-' /code /pre Trying to understand what happened, I'm googled for some info, and found the Mongo adapter code (yes, I didn't tried in my own computer). Reading the code (in pydal/adapters/mongo.py), I see a (possible) clue: The lines 148 to 163 is, in some way, weird for my reading. Maybe I misunderstood some point, but this pre code t = datetime.time(0,0,0) /code /pre is a formatter for a field type DATE, and this pre code t = datetime.date(2000,1,1) /code /pre is a formatter for a field type TIME ? Best regards, and keep going the invaluable work with this framework. -- José Ricardo Borba -- 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+un...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- José Ricardo Borba -- 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 a topic in the Google Groups web2py-users group. To unsubscribe from this topic, visit https://groups.google.com/d/topic/web2py/c8JpvzBHGhE/unsubscribe. To unsubscribe from this group and all its topics, send an email to web2py+un...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- 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+un...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- José Ricardo Borba -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -
Re: [web2py] Re: MongoDB
update your local copy of pydal, there are several updates regarding mongo in master branch Paolo 2015-05-07 21:14 GMT+02:00 José Ricardo Borba jrborba...@gmail.com: Allright! Updating pymongo to version 3.0 solves this up! Now I take care of the mongo time / pydal issue! Thanks a lot. 2015-05-07 9:05 GMT-03:00 Paolo Valleri paolo.vall...@gmail.com: You should use pymongo 3.0 On Wednesday, May 6, 2015 at 2:38:56 PM UTC+2, José Borba wrote: I'm very busy in these days, but I tried to start a new installation from the ground (to test the TIME issue with Mongodb in pydal #170), but even without this correction (i.e, with plain web2py clone from github) I receive the below error message. I'm simply copy the application folder to the new installation (side-by-side with welcome and examples). With CLI client (mongo) everything works fine. The welcome app works fine. I see that pydal tries to connect 5 times. The string to connect to mongo is fine (since is a local install. In production will have an user and a password too...). Version web2py™ Version 2.10.4-stable+timestamp.2015.04.26.09.05.21 Traceback Traceback (most recent call last): File /home/mydir/w2p210b/gluon/restricted.py, line 227, in restricted exec ccode in environment File /home/mydir/w2p210b/applications/rastreamento/models/db.py http://localhost:8000/admin/default/edit/rastreamento/models/db.py, line 12, in module db = DAL('mongodb://localhost/telemet', pool_size=0, lazy_tables=True) File /home/mydir/w2p210b/gluon/packages/dal/pydal/base.py, line 174, in __call__ obj = super(MetaDAL, cls).__call__(*args, **kwargs) File /mydir/w2p210b/gluon/packages/dal/pydal/base.py, line 459, in __init__ raise RuntimeError(Failure to connect, tried %d times:\n%s % (attempts, tb)) RuntimeError: Failure to connect, tried 5 times: Traceback (most recent call last): File /home/mydir/w2p210b/gluon/packages/dal/pydal/base.py, line 437, in __init__ self._adapter = ADAPTERS[self._dbname](**kwargs) File /home/mydir/w2p210b/gluon/packages/dal/pydal/adapters/base.py, line 57, in __call__ obj = super(AdapterMeta, cls).__call__(*args, **kwargs) File /home/mydir/w2p210b/gluon/packages/dal/pydal/adapters/mongo.py, line 58, in __init__ from pymongo.write_concern import WriteConcern File /home/mydir/w2p210b/gluon/custom_import.py, line 108, in custom_importer return NATIVE_IMPORTER(name, globals, locals, fromlist, level) ImportError: No module named write_concern Best regards, -- José Ricardo Borba -- 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. -- José Ricardo Borba -- 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 a topic in the Google Groups web2py-users group. To unsubscribe from this topic, visit https://groups.google.com/d/topic/web2py/3q5CfUSPQ1o/unsubscribe. To unsubscribe from this group and all its topics, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- 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.
Re: [web2py] Re: MongoDB adapter
It should be fixed in trunk Paolo On Saturday, May 2, 2015 at 1:24:32 PM UTC+2, José Borba wrote: OK. Thank you very much again. Cheers. 2015-05-02 8:22 GMT-03:00 Paolo Valleri paolo@gmail.com javascript: : Open an issue to don't forget it,I'll fix it in the next few days Paolo On May 2, 2015 1:18 PM, José Ricardo Borba jrbor...@gmail.com javascript: wrote: Paolo, Thank you for you quickly response. But I'm working with the latest web2py/Pydal 2.10.4 (downloaded 2.10.3 and updated). I forgot to mention this. I'm sorry. My second bet is that the parser of time (the time_itens above) need to be modified to work with time in mongo, Still not knowing what is the correct bug (if there are one) to report. Cheers, 2015-05-02 4:23 GMT-03:00 Paolo Valleri paolo@gmail.com javascript:: Hi, try use the latest version of pydal, Mongo adapter has been recently updated to work with pymongo 3.0 However, I think this is a bug. Can you open a bug report on https://github.com/web2py/pydal Paolo On Saturday, May 2, 2015 at 3:58:13 AM UTC+2, José Borba wrote: Hi 4 All, I'm new to mongoDB and still having some problems with a TIME field. When I set a TIME field in the table, fill the input field of a sqlform (only time is allowed) and send the data to table, all the record is inserted without any warning. But when I try to show in the sqlform, I receive a message: pre code Traceback (most recent call last): File /home/xxx.../applications/ras/controllers/appadmin.py, line 269, in select *fields, limitby=(start, stop)) File /home/xxx.../gluon/packages/dal/pydal/objects.py, line 2026, in select return adapter.select(self.query,fields,attributes) File /home/xxx.../gluon/packages/dal/pydal/adapters/mongo.py, line 353, in select result = processor(rows, fields, newnames, False) File /home/xxx.../gluon/packages/dal/pydal/adapters/base.py, line 1596, in parse value = self.parse_value(value,ft,blob_decode) File /home/xxx.../gluon/packages/dal/pydal/adapters/base.py, line 1450, in parse_value return self.parsemap[key](value,field_type) File /home/xxx.../gluon/packages/dal/pydal/adapters/base.py, line 1472, in parse_time time_items = map(int,str(value)[:8].strip().split(':')[:3]) ValueError: invalid literal for int() with base 10: '2000-01-' /code /pre Trying to understand what happened, I'm googled for some info, and found the Mongo adapter code (yes, I didn't tried in my own computer). Reading the code (in pydal/adapters/mongo.py), I see a (possible) clue: The lines 148 to 163 is, in some way, weird for my reading. Maybe I misunderstood some point, but this pre code t = datetime.time(0,0,0) /code /pre is a formatter for a field type DATE, and this pre code t = datetime.date(2000,1,1) /code /pre is a formatter for a field type TIME ? Best regards, and keep going the invaluable work with this framework. -- José Ricardo Borba -- 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+un...@googlegroups.com javascript:. For more options, visit https://groups.google.com/d/optout. -- José Ricardo Borba -- 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 a topic in the Google Groups web2py-users group. To unsubscribe from this topic, visit https://groups.google.com/d/topic/web2py/c8JpvzBHGhE/unsubscribe. To unsubscribe from this group and all its topics, send an email to web2py+un...@googlegroups.com javascript:. For more options, visit https://groups.google.com/d/optout. -- 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+un...@googlegroups.com javascript:. For more options, visit https://groups.google.com/d/optout. -- José Ricardo Borba -- 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
Re: [web2py] Re: MongoDB adapter
What is mongodb adapter? Where do I find that info? On Monday, May 4, 2015 at 8:39:48 AM UTC-4, Paolo Valleri wrote: It should be fixed in trunk Paolo On Saturday, May 2, 2015 at 1:24:32 PM UTC+2, José Borba wrote: OK. Thank you very much again. Cheers. 2015-05-02 8:22 GMT-03:00 Paolo Valleri paolo@gmail.com: Open an issue to don't forget it,I'll fix it in the next few days Paolo On May 2, 2015 1:18 PM, José Ricardo Borba jrbor...@gmail.com wrote: Paolo, Thank you for you quickly response. But I'm working with the latest web2py/Pydal 2.10.4 (downloaded 2.10.3 and updated). I forgot to mention this. I'm sorry. My second bet is that the parser of time (the time_itens above) need to be modified to work with time in mongo, Still not knowing what is the correct bug (if there are one) to report. Cheers, 2015-05-02 4:23 GMT-03:00 Paolo Valleri paolo@gmail.com: Hi, try use the latest version of pydal, Mongo adapter has been recently updated to work with pymongo 3.0 However, I think this is a bug. Can you open a bug report on https://github.com/web2py/pydal Paolo On Saturday, May 2, 2015 at 3:58:13 AM UTC+2, José Borba wrote: Hi 4 All, I'm new to mongoDB and still having some problems with a TIME field. When I set a TIME field in the table, fill the input field of a sqlform (only time is allowed) and send the data to table, all the record is inserted without any warning. But when I try to show in the sqlform, I receive a message: pre code Traceback (most recent call last): File /home/xxx.../applications/ras/controllers/appadmin.py, line 269, in select *fields, limitby=(start, stop)) File /home/xxx.../gluon/packages/dal/pydal/objects.py, line 2026, in select return adapter.select(self.query,fields,attributes) File /home/xxx.../gluon/packages/dal/pydal/adapters/mongo.py, line 353, in select result = processor(rows, fields, newnames, False) File /home/xxx.../gluon/packages/dal/pydal/adapters/base.py, line 1596, in parse value = self.parse_value(value,ft,blob_decode) File /home/xxx.../gluon/packages/dal/pydal/adapters/base.py, line 1450, in parse_value return self.parsemap[key](value,field_type) File /home/xxx.../gluon/packages/dal/pydal/adapters/base.py, line 1472, in parse_time time_items = map(int,str(value)[:8].strip().split(':')[:3]) ValueError: invalid literal for int() with base 10: '2000-01-' /code /pre Trying to understand what happened, I'm googled for some info, and found the Mongo adapter code (yes, I didn't tried in my own computer). Reading the code (in pydal/adapters/mongo.py), I see a (possible) clue: The lines 148 to 163 is, in some way, weird for my reading. Maybe I misunderstood some point, but this pre code t = datetime.time(0,0,0) /code /pre is a formatter for a field type DATE, and this pre code t = datetime.date(2000,1,1) /code /pre is a formatter for a field type TIME ? Best regards, and keep going the invaluable work with this framework. -- José Ricardo Borba -- 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+un...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- José Ricardo Borba -- 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 a topic in the Google Groups web2py-users group. To unsubscribe from this topic, visit https://groups.google.com/d/topic/web2py/c8JpvzBHGhE/unsubscribe. To unsubscribe from this group and all its topics, send an email to web2py+un...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- 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+un...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- José Ricardo Borba -- 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
Re: [web2py] Re: MongoDB adapter
Paolo, Thank you for you quickly response. But I'm working with the latest web2py/Pydal 2.10.4 (downloaded 2.10.3 and updated). I forgot to mention this. I'm sorry. My second bet is that the parser of time (the time_itens above) need to be modified to work with time in mongo, Still not knowing what is the correct bug (if there are one) to report. Cheers, 2015-05-02 4:23 GMT-03:00 Paolo Valleri paolo.vall...@gmail.com: Hi, try use the latest version of pydal, Mongo adapter has been recently updated to work with pymongo 3.0 However, I think this is a bug. Can you open a bug report on https://github.com/web2py/pydal Paolo On Saturday, May 2, 2015 at 3:58:13 AM UTC+2, José Borba wrote: Hi 4 All, I'm new to mongoDB and still having some problems with a TIME field. When I set a TIME field in the table, fill the input field of a sqlform (only time is allowed) and send the data to table, all the record is inserted without any warning. But when I try to show in the sqlform, I receive a message: pre code Traceback (most recent call last): File /home/xxx.../applications/ras/controllers/appadmin.py, line 269, in select *fields, limitby=(start, stop)) File /home/xxx.../gluon/packages/dal/pydal/objects.py, line 2026, in select return adapter.select(self.query,fields,attributes) File /home/xxx.../gluon/packages/dal/pydal/adapters/mongo.py, line 353, in select result = processor(rows, fields, newnames, False) File /home/xxx.../gluon/packages/dal/pydal/adapters/base.py, line 1596, in parse value = self.parse_value(value,ft,blob_decode) File /home/xxx.../gluon/packages/dal/pydal/adapters/base.py, line 1450, in parse_value return self.parsemap[key](value,field_type) File /home/xxx.../gluon/packages/dal/pydal/adapters/base.py, line 1472, in parse_time time_items = map(int,str(value)[:8].strip().split(':')[:3]) ValueError: invalid literal for int() with base 10: '2000-01-' /code /pre Trying to understand what happened, I'm googled for some info, and found the Mongo adapter code (yes, I didn't tried in my own computer). Reading the code (in pydal/adapters/mongo.py), I see a (possible) clue: The lines 148 to 163 is, in some way, weird for my reading. Maybe I misunderstood some point, but this pre code t = datetime.time(0,0,0) /code /pre is a formatter for a field type DATE, and this pre code t = datetime.date(2000,1,1) /code /pre is a formatter for a field type TIME ? Best regards, and keep going the invaluable work with this framework. -- José Ricardo Borba -- 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. -- José Ricardo Borba -- 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.
Re: [web2py] Re: MongoDB adapter
Open an issue to don't forget it,I'll fix it in the next few days Paolo On May 2, 2015 1:18 PM, José Ricardo Borba jrborba...@gmail.com wrote: Paolo, Thank you for you quickly response. But I'm working with the latest web2py/Pydal 2.10.4 (downloaded 2.10.3 and updated). I forgot to mention this. I'm sorry. My second bet is that the parser of time (the time_itens above) need to be modified to work with time in mongo, Still not knowing what is the correct bug (if there are one) to report. Cheers, 2015-05-02 4:23 GMT-03:00 Paolo Valleri paolo.vall...@gmail.com: Hi, try use the latest version of pydal, Mongo adapter has been recently updated to work with pymongo 3.0 However, I think this is a bug. Can you open a bug report on https://github.com/web2py/pydal Paolo On Saturday, May 2, 2015 at 3:58:13 AM UTC+2, José Borba wrote: Hi 4 All, I'm new to mongoDB and still having some problems with a TIME field. When I set a TIME field in the table, fill the input field of a sqlform (only time is allowed) and send the data to table, all the record is inserted without any warning. But when I try to show in the sqlform, I receive a message: pre code Traceback (most recent call last): File /home/xxx.../applications/ras/controllers/appadmin.py, line 269, in select *fields, limitby=(start, stop)) File /home/xxx.../gluon/packages/dal/pydal/objects.py, line 2026, in select return adapter.select(self.query,fields,attributes) File /home/xxx.../gluon/packages/dal/pydal/adapters/mongo.py, line 353, in select result = processor(rows, fields, newnames, False) File /home/xxx.../gluon/packages/dal/pydal/adapters/base.py, line 1596, in parse value = self.parse_value(value,ft,blob_decode) File /home/xxx.../gluon/packages/dal/pydal/adapters/base.py, line 1450, in parse_value return self.parsemap[key](value,field_type) File /home/xxx.../gluon/packages/dal/pydal/adapters/base.py, line 1472, in parse_time time_items = map(int,str(value)[:8].strip().split(':')[:3]) ValueError: invalid literal for int() with base 10: '2000-01-' /code /pre Trying to understand what happened, I'm googled for some info, and found the Mongo adapter code (yes, I didn't tried in my own computer). Reading the code (in pydal/adapters/mongo.py), I see a (possible) clue: The lines 148 to 163 is, in some way, weird for my reading. Maybe I misunderstood some point, but this pre code t = datetime.time(0,0,0) /code /pre is a formatter for a field type DATE, and this pre code t = datetime.date(2000,1,1) /code /pre is a formatter for a field type TIME ? Best regards, and keep going the invaluable work with this framework. -- José Ricardo Borba -- 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. -- José Ricardo Borba -- 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 a topic in the Google Groups web2py-users group. To unsubscribe from this topic, visit https://groups.google.com/d/topic/web2py/c8JpvzBHGhE/unsubscribe. To unsubscribe from this group and all its topics, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- 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.
Re: [web2py] Re: MongoDB adapter
OK. Thank you very much again. Cheers. 2015-05-02 8:22 GMT-03:00 Paolo Valleri paolo.vall...@gmail.com: Open an issue to don't forget it,I'll fix it in the next few days Paolo On May 2, 2015 1:18 PM, José Ricardo Borba jrborba...@gmail.com wrote: Paolo, Thank you for you quickly response. But I'm working with the latest web2py/Pydal 2.10.4 (downloaded 2.10.3 and updated). I forgot to mention this. I'm sorry. My second bet is that the parser of time (the time_itens above) need to be modified to work with time in mongo, Still not knowing what is the correct bug (if there are one) to report. Cheers, 2015-05-02 4:23 GMT-03:00 Paolo Valleri paolo.vall...@gmail.com: Hi, try use the latest version of pydal, Mongo adapter has been recently updated to work with pymongo 3.0 However, I think this is a bug. Can you open a bug report on https://github.com/web2py/pydal Paolo On Saturday, May 2, 2015 at 3:58:13 AM UTC+2, José Borba wrote: Hi 4 All, I'm new to mongoDB and still having some problems with a TIME field. When I set a TIME field in the table, fill the input field of a sqlform (only time is allowed) and send the data to table, all the record is inserted without any warning. But when I try to show in the sqlform, I receive a message: pre code Traceback (most recent call last): File /home/xxx.../applications/ras/controllers/appadmin.py, line 269, in select *fields, limitby=(start, stop)) File /home/xxx.../gluon/packages/dal/pydal/objects.py, line 2026, in select return adapter.select(self.query,fields,attributes) File /home/xxx.../gluon/packages/dal/pydal/adapters/mongo.py, line 353, in select result = processor(rows, fields, newnames, False) File /home/xxx.../gluon/packages/dal/pydal/adapters/base.py, line 1596, in parse value = self.parse_value(value,ft,blob_decode) File /home/xxx.../gluon/packages/dal/pydal/adapters/base.py, line 1450, in parse_value return self.parsemap[key](value,field_type) File /home/xxx.../gluon/packages/dal/pydal/adapters/base.py, line 1472, in parse_time time_items = map(int,str(value)[:8].strip().split(':')[:3]) ValueError: invalid literal for int() with base 10: '2000-01-' /code /pre Trying to understand what happened, I'm googled for some info, and found the Mongo adapter code (yes, I didn't tried in my own computer). Reading the code (in pydal/adapters/mongo.py), I see a (possible) clue: The lines 148 to 163 is, in some way, weird for my reading. Maybe I misunderstood some point, but this pre code t = datetime.time(0,0,0) /code /pre is a formatter for a field type DATE, and this pre code t = datetime.date(2000,1,1) /code /pre is a formatter for a field type TIME ? Best regards, and keep going the invaluable work with this framework. -- José Ricardo Borba -- 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. -- José Ricardo Borba -- 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 a topic in the Google Groups web2py-users group. To unsubscribe from this topic, visit https://groups.google.com/d/topic/web2py/c8JpvzBHGhE/unsubscribe. To unsubscribe from this group and all its topics, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- 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. -- José Ricardo Borba -- 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.
Re: [web2py] Re: MongoDb
Hey, Thanks for the answer. Luckily there are no joins, but I need to see what web2py features of DAL won't work. Thanks, Regards, Tushar Tuteja On 30 December 2013 16:44, Alan Etkin spame...@gmail.com wrote: I have an app running on MySQL , I want to use mongoDB instead. I want to help on migration from mysql to mongoDB. Thanks, Beware that mongodb adapter is in an experimental stage of development, so you should know what you are doing before migrating. I suppose there are lots of howtos for migrating data between those backends. The web2py way of doing has two options, AFAIK: - use cpdb (never tried it with those connections) - use DAL.import_from_csv_file and DAL.export_from_csv_file methods (for a small amount of db records) Mind that the most important issue is that mongodb is not a relational database management system and there's no such thing as JOIN queries. This is a limitation for web2py also, since some of the web2py features require joins to work. -- 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 a topic in the Google Groups web2py-users group. To unsubscribe from this topic, visit https://groups.google.com/d/topic/web2py/oPCXZnnFvyI/unsubscribe. To unsubscribe from this group and all its topics, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- Tushar Tuteja Undergraduate Student(Fourth Year) Civil Engineering IIT Delhi +919953061943 ttut...@gmail.com ttut...@gmal.com ce1090...@civil.iitd.ernet.in The question isn't who is going to let me; its who is going to stop me! - Howard Roark -- 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/groups/opt_out.
Re: [web2py] Re: MongoDb
Thanks for the answer. Luckily there are no joins, but I need to see what web2py features of DAL won't work. To my knowledge, you cannot use the scheduler or Auth.accessible_query, everything else not requiring join queries should work. -- 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/groups/opt_out.
Re: [web2py] Re: MongoDB Adapter error in select
I've enumerated fields and colnames and they are like this: fields: id text integer string colnames: city age _id name I believe they don't match and thats why there's this error: File /opt/web2py/gluon/dal.py, line 8134, in select return adapter.select(self.query,fields,attributes) File /opt/web2py/gluon/dal.py, line 4711, in select return processor(rows,fields,colnames,False) File /opt/web2py/gluon/dal.py, line 1681, in parse self.parse_value(value, fields[j].type,blob_decode) File /opt/web2py/gluon/dal.py, line 1575, in parse_value return self.parsemap[key](value,field _type) File /opt/web2py/gluon/dal.py, line 1641, in parse_id return int(value) ValueError: invalid literal for int() with base 10: 'Toronto' Francisco Costa http://franciscocosta.com On Thu, May 10, 2012 at 7:03 AM, kokoyo hoatre2...@gmail.com wrote: Hi Massimo, i did it and get output (test on user_auth table): mongoqry_dict ={'email': 'myem...@gmail.com'} mongofields_dict = SON([('id':1), ('first_name':1), ('last_name': 1), ('email':1), ('password':1), ('registration_key': 1), ('reset_password_key':1), ('registration_id':1) ]) mongo_list_dicts = pymongo.cursor.Cursor object at 9a809aa On Thursday, May 10, 2012 1:52:02 PM UTC+9, Massimo Di Pierro wrote: Should be an easy fix but I need your help. Before line 4711 of dal.py return processor(rows,fields,**colnames,False) can you add print rows print fields print colnames what is the output when it fails? On Wednesday, 9 May 2012 05:42:56 UTC-5, Francisco Costa wrote: I've enumerated fields and colnames and they are like this: fields: id text integer string colnames: city age _id name I believe they don't match and thats why there's this error: File /opt/web2py/gluon/dal.py, line 8134, in select return adapter.select(self.query,fiel**ds,attributes) File /opt/web2py/gluon/dal.py, line 4711, in select return processor(rows,fields,colnames**,False) File /opt/web2py/gluon/dal.py, line 1681, in parse self.parse_value(value, fields[j].type,blob_decode) File /opt/web2py/gluon/dal.py, line 1575, in parse_value return self.parsemap[key](value,field _type) File /opt/web2py/gluon/dal.py, line 1641, in parse_id return int(value) ValueError: invalid literal for int() with base 10: 'Toronto' On Monday, May 7, 2012 11:40:36 PM UTC+1, Massimo Di Pierro wrote: Please try again. On Monday, 7 May 2012 15:48:04 UTC-5, Francisco Costa wrote: missing a colon at the end of the line 4677 if key == 'id' and now I get this error File /opt/web2py/gluon/dal.py, line 8134, in select return adapter.select(self.query,fiel**ds,attributes) File /opt/web2py/gluon/dal.py, line 4711, in select return processor(rows,columns,False) File /opt/web2py/gluon/dal.py, line 1675, in parse for j,colname in enumerate(colnames): TypeError: 'bool' object is not iterable maybe because of the False on line 4711 On Monday, May 7, 2012 9:27:35 PM UTC+1, Massimo Di Pierro wrote: Thanks for your help and check on this. I just committed a fix in trunk that should address it. Please let me know. On Monday, 7 May 2012 15:19:40 UTC-5, Francisco Costa wrote: I think that the mongofields_dict.keys() don't match to the data in the rows mongofields_dict: id name age city rows: Toronto 66L 24652490551171733682233802752L John On Monday, May 7, 2012 8:42:33 PM UTC+1, Massimo Di Pierro wrote: Your linennumbers do not much the code in trunk. Please try the code in trunk. Anyway, something goes wrong in the parse(self, rows, fields, colnames, blob_decode=True) function. I suspect mongo does not return the columns in the order web2py think it does. Can you print the input of the parse function? On Monday, 7 May 2012 13:20:39 UTC-5, Francisco Costa wrote: So I have this: import sys import time from gluon.dal import DAL, Field mongo = DAL('mongodb://localhost:**27017/tymr') mongo.define_table('user', Field('name', 'text'), Field('age', 'integer'), Field('city', 'string') ) def insert_users(): mongo.user.insert(name='John', age=66, city='Toronto') mongo.user.insert(name='Mark', age=43, city='Boston') mongo.user.insert(name='Tom', age=43, city='Detroit') mongo.user.insert(name='Jim', age=18, city='Detroit') mongo.user.insert(name='Jack', age=18) mongo.user.insert(name='Eric', city='Boston') return 'users in database' def find_users(): users = mongo(mongo.user.age==66).**select() return dict(users=users) after I run *insert_users* I check in MongoDb via terminal and everything is correct: db.user.find() { _id : ObjectId(**4fa80feea34feb34f800), city : Toronto, age : NumberLong(66), name : John } { _id : ObjectId(**4fa80feea34feb34f801), city : Boston, age : NumberLong(43), name : Mark } { _id : ObjectId(**4fa80feea34feb34f802), city : Detroit, age
Re: [web2py] Re: MongoDB and Web2py
On Wed, 2011-10-12 at 04:07 -0700, David Marko wrote: Massimo adviced me to use something like this previsously: def make_connection(): from pymongo import Connection connection = Connection('localhost', 27017) return connection connection = cache.ram('mongodb',make_connection,None) It seemed to work but I had no opportunity to test it under some load. This is some kind of connection pooling/share What about using the standard DAL with MongoDBAdapter to manage the connection pool and then use the pymongo.Connection() in db._adapter.connection to directly operate on the database? I haven't tested yet (for now I'm just doing experiments, so I don't need connection pool), but looks like this should work.. -- Samuele ~redShadow~ Santi redshadow[at]hackzine.org - redshadowhack[at]gmail.com Blog: http://hackzine.org GPG Key signature: 050D 3E9F 6E0B 44CE C008 D1FC 166C 3C7E EB26 4933 /me recommends: Squadra Informatica - http://www.squadrainformatica.com - Proud ThinkPad T-Series owner - Registered Linux-User: #440008 * GENTOO User since 1199142000 (2008-01-01) * former DEBIAN SID user Software is like sex: it's better when it's free! -- Linus Torvalds signature.asc Description: This is a digitally signed message part
Re: [web2py] Re: MongoDB and Web2py
I used that for some samples and talks, also for a small project. as I I am not doing advanced operations I cant say if it works or not. But for my sample needs worked very well. On Sun, Oct 2, 2011 at 7:39 PM, Massimo Di Pierro massimo.dipie...@gmail.com wrote: At this time my priority is to finish document the rest of undocumented web2py features. I will work on this as soon as I finish that. Anyway, in dal.py there is a mongodb adapter. It can only do insert. Has anybody tried that? massimo On Oct 2, 4:52 pm, Francisco Costa m...@franciscocosta.com wrote: I don't want to spam the group about this, but I would like to have some official incites about when will the DAL have a MongoDB Adapter. Since this is the most requested feature by the web2py communityhttp:// web2py.uservoice.com/forums/42577-generalare there any plans or schedule for this support? -- -- Bruno Rocha [ About me: http://zerp.ly/rochacbruno ] [ Aprenda a programar: http://CursoDePython.com.br ] [ O seu aliado nos cuidados com os animais: http://AnimalSystem.com.br ] [ Consultoria em desenvolvimento web: http://www.blouweb.com ]
Re: [web2py] Re: MongoDB supported by DAL
Mongo over couch? Why? 2011/8/4 Francisco Costa m...@franciscocosta.com On Aug 4, 3:46 pm, David Marko dma...@tiscali.cz wrote: Also inteersted here. Can afford some time for testing ... This would be great to have. MongoDb is being widely adopted by a larger number of organizations. If DAL could support MongoDB, it would have a major impact in some development companies.
Re: [web2py] Re: MongoDB supported by DAL
Someone probably needs to step up and try to work it out. I don't think it's going to get done with periodic status inquiries here.
Re: [web2py] Re: MongoDB and Web2Py
I will test it for my new application: x2py = a web2py-powered web-based email client. Yet, another web-based email client!
Re: [web2py] Re: MongoDB and Web2Py
Thanks Massimo; I never thought to even try this; I will make a sample project and test this; (For me the other way works; so I wouldn't ask that you implement it in DAL; (but I am happy to test it;) Thanks for your great software. David. On 4/4/11 9:24 AM, Massimo Di Pierro wrote: DAL allows to do: db=DAL('mongodb://127.0.0.1:5984/db') it allows to define_table and allows db.table.insert(...) other methods have not been implemented because the above was never tested. If you help us with testing I can implement the other methods (select, count, update). On Apr 1, 9:55 am, David J.da...@styleflare.com wrote: While DAL might not support MongDB; you can still use it via mongoengine; On 4/1/11 10:41 AM, Marcel Luethi wrote: Despite a lot of time, I'd like to help as well. MongoDB looks promising. On 1 Apr., 04:58, Massimo Di Pierromassimo.dipie...@gmail.com wrote: Lots of people asked for support but nobody volunteered to help test it. If you are interested and can help with some regular tests we can make it work in relatively short time. Massimo On Mar 31, 9:09 pm, luckysmackluckysm...@gmail.comwrote: I have read a few older messages about mongoDB being made to work with the DAL. But they all seem to be pretty dated and have not specified what was working and what wasnt. massimo menitoned that it may be ready by january of this year. But under the supported list it wasnt listed. So im just curious as to what the status of using mongoDB is with web2py and if anyone has a basic example on how I would use it. Thanks
Re: [web2py] Re: MongoDB and Web2Py
+1 On 1 April 2011 06:35, David Marko dma...@tiscali.cz wrote: I'm also interested in testing ... David Marko
Re: [web2py] Re: MongoDB and Web2Py
While DAL might not support MongDB; you can still use it via mongoengine; On 4/1/11 10:41 AM, Marcel Luethi wrote: Despite a lot of time, I'd like to help as well. MongoDB looks promising. On 1 Apr., 04:58, Massimo Di Pierromassimo.dipie...@gmail.com wrote: Lots of people asked for support but nobody volunteered to help test it. If you are interested and can help with some regular tests we can make it work in relatively short time. Massimo On Mar 31, 9:09 pm, luckysmackluckysm...@gmail.com wrote: I have read a few older messages about mongoDB being made to work with the DAL. But they all seem to be pretty dated and have not specified what was working and what wasnt. massimo menitoned that it may be ready by january of this year. But under the supported list it wasnt listed. So im just curious as to what the status of using mongoDB is with web2py and if anyone has a basic example on how I would use it. Thanks
Re: [web2py] Re: mongoDb
from pymongo import Connection ... ... connection = Connection() ... ... ... ... connection.disconnect() In some controllers I tried to keep connection in session or cache, but it fails. 2010/11/25 David Marko dma...@tiscali.cz Where do you store the Pymongo connection object between requests? In some cache object? David On 25 lis, 16:16, Bruno Rocha rochacbr...@gmail.com wrote: I am using PyMongo for one projecthttp:// api.mongodb.org/python/1.9%2B/index.html I put the libs in modules and created some methods in my /models to abstract commom tasks, PyMongo is very simple, so it is easy to access the data directly form controllers or views using its API. 2010/11/25 Aurigadl aurig...@gmail.com In my projects I'm using MongoDB I need to work with this tool you need this to work with web2py? Make controller for this RDBMS or or this tool work wiht this -- Bruno Rochahttp://about.me/rochacbruno/bio -- Bruno Rocha http://about.me/rochacbruno/bio
Re: [web2py] Re: mongoDb
also, response._caller can be useful to raise the disconnection 2010/11/25 Bruno Rocha rochacbr...@gmail.com from pymongo import Connection ... ... connection = Connection() ... ... ... ... connection.disconnect() In some controllers I tried to keep connection in session or cache, but it fails. 2010/11/25 David Marko dma...@tiscali.cz Where do you store the Pymongo connection object between requests? In some cache object? David On 25 lis, 16:16, Bruno Rocha rochacbr...@gmail.com wrote: I am using PyMongo for one projecthttp:// api.mongodb.org/python/1.9%2B/index.html I put the libs in modules and created some methods in my /models to abstract commom tasks, PyMongo is very simple, so it is easy to access the data directly form controllers or views using its API. 2010/11/25 Aurigadl aurig...@gmail.com In my projects I'm using MongoDB I need to work with this tool you need this to work with web2py? Make controller for this RDBMS or or this tool work wiht this -- Bruno Rochahttp://about.me/rochacbruno/bio -- Bruno Rocha http://about.me/rochacbruno/bio -- Bruno Rocha http://about.me/rochacbruno/bio