Re: [web2py] Re: MongoDB

2018-11-19 Thread Anthony
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

Re: [web2py] Re: MongoDB

2018-11-19 Thread Lovedie JC
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,

Re: [web2py] Re: MongoDB

2018-11-19 Thread Anthony
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

Re: [web2py] Re: MongoDB

2018-11-19 Thread Lovedie JC
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) > -

[web2py] Re: MongoDB

2018-11-12 Thread 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

[web2py] Re: Mongodb Error

2018-11-01 Thread lbjc1978
turns out to be a password issue. 'db = DAL('mongodb://localhost/connect_test')' works well On Tuesday, 30 October 2018 23:37:23 UTC+3, 黄祥 wrote: > > from the error traceback seems like a problem with a connection to > mongodb, wrong password or username, pls ensure the authentication to >

[web2py] Re: Mongodb Error

2018-10-30 Thread 黄祥
from the error traceback seems like a problem with a connection to mongodb, wrong password or username, pls ensure the authentication to mongodb connection is correct best regards, stifan -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) -

[web2py] Re: Mongodb api reference

2015-05-09 Thread Ron Chatterjee
Saying, they can be used interchangeably if warranted. On Saturday, May 9, 2015 at 9:34:31 AM UTC-4, Alan Etkin wrote: Question: is there an equivalent db().select(db.blog.author) in pymongo api? For example if I use the above implementation in pymongo: db1.blog.author (wouldn’t work).

[web2py] Re: Mongodb api reference

2015-05-09 Thread Ron Chatterjee
On this note: I have this blog post let’s say (with mongodb connection): db.define_table('blog', Field('author', 'string', requires = IS_NOT_EMPTY()), Field('date', 'datetime', default = request.now), Field('text', 'text')) I can do: print

[web2py] Re: Mongodb api reference

2015-05-09 Thread Alan Etkin
Question: is there an equivalent db().select(db.blog.author) in pymongo api? For example if I use the above implementation in pymongo: db1.blog.author (wouldn’t work). But I can get specific author db1.blog.find({‘author’:’Ron’}) That is also equivalent to: db(db.blog.author ==

Re: [web2py] Re: MongoDB

2015-05-07 Thread José Ricardo Borba
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

Re: [web2py] Re: MongoDB

2015-05-07 Thread José Ricardo Borba
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

Re: [web2py] Re: MongoDB adapter

2015-05-07 Thread José Ricardo Borba
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

Re: [web2py] Re: MongoDB

2015-05-07 Thread Paolo Valleri
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.

[web2py] Re: MongoDB

2015-05-07 Thread Paolo Valleri
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

Re: [web2py] Re: MongoDB adapter

2015-05-04 Thread Paolo Valleri
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

Re: [web2py] Re: MongoDB adapter

2015-05-04 Thread Ron Chatterjee
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

Re: [web2py] Re: MongoDB adapter

2015-05-02 Thread José Ricardo Borba
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

Re: [web2py] Re: MongoDB adapter

2015-05-02 Thread Paolo Valleri
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

Re: [web2py] Re: MongoDB adapter

2015-05-02 Thread José Ricardo Borba
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

[web2py] Re: MongoDB adapter

2015-05-02 Thread Paolo Valleri
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

[web2py] Re: MongoDB and Web2py in Windows

2014-12-10 Thread Oliver
I tried binary version. It did not work. Im trying to subscribe to CouchDB or MongoDB online and test it instead running my db local machine. thanks for the help. On Friday, November 28, 2014 6:51:15 PM UTC-5, Massimo Di Pierro wrote: Are you using the source version of the binary version

[web2py] Re: MongoDB and Web2py in Windows

2014-12-10 Thread Massimo Di Pierro
Exactely. The binary version is not supposed to work. It comes with its own version of python therefore it does not see any module that you may have installed. If you want to use modules like pymongo you must install Python, install pymongo, AND run web2py source so it uses your own python

[web2py] Re: MongoDB and Web2py in Windows

2014-11-28 Thread Massimo Di Pierro
Are you using the source version of the binary version of web2py? The binary version comes his own python version. On Wednesday, 26 November 2014 09:42:56 UTC-6, Oliver wrote: Hi All, anyone have success using MongoDb in DAL? When I ran web2py, I don't see MongoDB listed. here is what I

[web2py] Re: mongodb type 'exceptions.RuntimeError' you must specify a Field(...,uploadfolder

2014-02-23 Thread Massimo Di Pierro
Please open a ticket on google code. On Sunday, 23 February 2014 07:06:57 UTC-6, Mr. J.S Jones wrote: When using upload fields with mongodb and SQLFORM (not factory forms) I get the runtime error type 'exceptions.RuntimeError' you must specify a Field(...,uploadfolder=...) the same code but

[web2py] Re: MongoDb

2013-12-30 Thread Alan Etkin
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

Re: [web2py] Re: MongoDb

2013-12-30 Thread Tushar Tuteja
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

Re: [web2py] Re: MongoDb

2013-12-30 Thread Alan Etkin
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 -

[web2py] Re: mongodb upload field raising exception data must be an instance of str

2013-11-15 Thread Alan Etkin
I suppose it is ok but should be tested. Please file an issue at http://code.google.com/p/web2py/issues http://code.google.com/p/web2py/issues/detail?id=1777 -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

[web2py] Re: mongodb upload field raising exception data must be an instance of str

2013-11-14 Thread Alan Etkin
and it returns the same error. The thing is how do I fix this? I tried: 5405elif fieldtype == blob: if value== None: But ain't sure if that is right or not. I suppose it is ok but should be tested. Please file an issue at

[web2py] Re: mongodb support

2013-10-23 Thread Alan Etkin
Hi, can anyone advise the current status of web2py support of mongodb? thanks The MongoDBAdapter is experimental, and implements all standard DAL commands. https://groups.google.com/d/msg/web2py/ify9tjXSooU/y0ZYx1Z3v8cJ -- Resources: - http://web2py.com - http://web2py.com/book

[web2py] Re: mongodb support

2013-10-23 Thread Alan Etkin
went into problem when I tried to use it for large object. Please post the issue here if you think it's the adapter's fault: http://code.google.com/p/web2py/issues Adding any code and environment information needed to reproduce it. -- Resources: - http://web2py.com - http://web2py.com/book

[web2py] Re: MongoDB and list:reference?

2013-06-08 Thread Alan Etkin
I created an issue so we can fix this http://code.google.com/p/web2py/issues/detail?id=1519 -- --- 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] Re: MongoDB and list:reference?

2013-06-08 Thread Massimo Di Pierro
Thanks Alan. On Saturday, 8 June 2013 10:22:35 UTC-5, Alan Etkin wrote: I created an issue so we can fix this http://code.google.com/p/web2py/issues/detail?id=1519 -- --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from

[web2py] Re: MongoDB and list:reference?

2013-06-05 Thread Alan Etkin
values[fieldname] = [self.object_id(x) for x in v] Note: there's no need to add the loop for creating the object id's since that is handled by the adapter represent method (that is the behavior with update). It should be enough to just test for (line 5337) if fieldtype.startswith(reference)

[web2py] Re: MongoDB and list:reference?

2013-06-04 Thread Alan Etkin
By the way, I can get around this by changing this line in MongoDBAdapter's insert function in dal.py: values[fieldname] = self.object_id(v) to this: if isinstance(v,list): values[fieldname] = [self.object_id(x) for x in v] else: values[fieldname] = self.object_id(v) I think

[web2py] Re: MongoDB and list:reference?

2013-06-04 Thread Alex Schlegel
update seems to work fine with list:reference as long as the field's value is actually an iterable. I'll do some more testing and make a pull request later. Thanks! On Tuesday, June 4, 2013 2:17:37 PM UTC-4, Alan Etkin wrote: By the way, I can get around this by changing this line in

[web2py] Re: MongoDB 'document' or 'dict' filetype

2013-01-17 Thread Alan Etkin
At the moment MongodbAdapter only has these filetypes The MongoDBAdapter now supports storing JSON documents, plus a json widget and IS_JSON validator. See this slice for more details: http://www.web2pyslices.com/slice/show/1580/save-the-earth-from-a-total-data-mess-with-mongodbadapter --

[web2py] Re: mongodb 2 errors: BSON can only handle up to 8-byte ints, second argument must be of type ObjectI

2012-10-23 Thread Adi
my fault Niphlod clarified that can't use mongodb for Auth functionality, so I left that part with mysql, otherwise created table (colletion), inserted records and displayed smartgrid. All worked fine, except viewing record details from smartgrid. 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12.

[web2py] Re: mongodb 2 errors: BSON can only handle up to 8-byte ints, second argument must be of type ObjectI

2012-10-23 Thread Massimo Di Pierro
The problem is that dal+mongo does not handle references right because of this. It must be refactored. On Tuesday, 23 October 2012 12:27:56 UTC-5, Adi wrote: my fault Niphlod clarified that can't use mongodb for Auth functionality, so I left that part with mysql, otherwise created table

[web2py] Re: mongodb error

2012-09-30 Thread Massimo Di Pierro
The mongodb support in DAL is experimental. Thanks for helping test it. We could use some help in this area. On Saturday, 29 September 2012 21:35:09 UTC-5, Jose Galvez wrote: I am trying to run through the image blog example from the docs using mongodb. when I try to upload an image I get

[web2py] Re: mongodb error

2012-09-30 Thread Jose Galvez
Saw that it was still considered experimental, still might give it a try if the only thing that is not working is the whole blob thing, as what I am really interested in storing and whole documents in it.essentially I am after the the entire JSON representation of document, and the ability to

[web2py] Re: Mongodb - ImportError: cannot import name son

2012-06-12 Thread Massimo Di Pierro
Have a possible fix in trunk. Give it a try. On Monday, 11 June 2012 20:47:48 UTC-5, Michael Freitas wrote: I tried to setup a new application using the latest source code form trunk and mongodb. I get the error pasted at the end when I try to register a new user in my app. I tried

[web2py] Re: Mongodb - ImportError: cannot import name son

2012-06-12 Thread Michael Freitas
Thanks, The latest trunk sorted out the import error. I also changed #import pymongo.objectid -- import bson.objectid and replaced all references. With my limited testing so far it seems to be working. If I try to register a new user with auth in mogodb I get the same error reported

[web2py] Re: Mongodb - ImportError: cannot import name son

2012-06-12 Thread Massimo Di Pierro
Can you email me a patch with your change. On Tuesday, 12 June 2012 12:31:50 UTC-5, Michael Freitas wrote: Thanks, The latest trunk sorted out the import error. I also changed #import pymongo.objectid -- import bson.objectid and replaced all references. With my limited testing so far it

[web2py] Re: MongoDB Adapter error in select

2012-05-21 Thread Francisco Costa
requested here: https://groups.google.com/d/topic/web2py/pqdYpUbMXKQ/discussion On Monday, May 14, 2012 2:35:43 AM UTC+1, Massimo Di Pierro wrote: I think you can already db.table.insert(**dict()) Are you asking for something different? On Saturday, 12 May 2012 05:25:02 UTC-5,

[web2py] Re: MongoDB 'document' or 'dict' filetype

2012-05-21 Thread Massimo Di Pierro
I think if that is what you want to do, you go beyond the scope of the dal and perhaps you should use the mongodb api instead of the dal. Perhaps we should discuss it on web2py developers. Anyway, feel free to open a ticket about this. On Monday, 21 May 2012 04:55:01 UTC-5, Francisco Costa

[web2py] Re: MongoDb Adapter issues

2012-05-17 Thread Massimo Di Pierro
Did you apply your changes to the latest trunk. If so, could you post your changes. We will review them and probably incorporate them. massimo On Thursday, 17 May 2012 19:46:00 UTC-5, Krzysztof Mulica wrote: Hello, I'm having issues with the mongo adapter doing selects (using latest code

[web2py] Re: MongoDb Adapter issues

2012-05-17 Thread Massimo Di Pierro
I will wait when you are done than... when you think this should be included, perhaps it will be easier to upload the dal.py as an issue in google code so I will not miss it. On Thursday, 17 May 2012 21:06:46 UTC-5, Krzysztof Mulica wrote: Yes latest trunk, but i'm working through a few more

[web2py] Re: MongoDB Adapter error in select

2012-05-15 Thread Krzysztof Mulica
I'm guessing he's looking for something like I am, http://cookbook.mongodb.org/patterns/count_tags/ { title : A blog post, author : Kristina, content : ..., tags : [MongoDB, Map/Reduce, Recipe] } using DAL, how would I go about inserting that list, what wouldd the type be

[web2py] Re: MongoDB Adapter error in select

2012-05-13 Thread Massimo Di Pierro
I think you can already db.table.insert(**dict()) Are you asking for something different? On Saturday, 12 May 2012 05:25:02 UTC-5, Francisco Costa wrote: It works Massimo! In MongoDb is also common to insert dicts, can we also have that? At the moment it only saves in the string format

[web2py] Re: MongoDB Adapter error in select

2012-05-12 Thread Francisco Costa
It works Massimo! In MongoDb is also common to insert dicts, can we also have that? At the moment it only saves in the string format (check player Field) { _id : ObjectId(4fae3839b34f4brf5a31), city : Madrid, club : Real Madrid, *player : {'n_goals': 43, 'name': 'Ronaldo'}* } On Friday,

[web2py] Re: MongoDB Adapter error in select

2012-05-11 Thread Francisco Costa
Thanks Massimo. Please let me know if you need more help in debugging it On Friday, May 11, 2012 12:40:35 AM UTC+1, Massimo Di Pierro wrote: Now I understand better where all these problems come from. I shall fix it tonight. On Thursday, 10 May 2012 18:02:24 UTC-5, Francisco Costa wrote:

[web2py] Re: MongoDB Adapter error in select

2012-05-11 Thread Francisco Costa
the latest DAL produces this error users = mongo(mongo.user.age==18).select() File /opt/web2py/gluon/dal.py, line 8004, in select return adapter.select(self.query,fields,attributes) File /opt/web2py/gluon/dal.py, line 4528, in select colnames = [fix(column) for column in

[web2py] Re: MongoDB Adapter error in select

2012-05-11 Thread Massimo Di Pierro
One more try please. On Friday, 11 May 2012 06:04:52 UTC-5, Francisco Costa wrote: Thanks Massimo. Please let me know if you need more help in debugging it On Friday, May 11, 2012 12:40:35 AM UTC+1, Massimo Di Pierro wrote: Now I understand better where all these problems come from. I shall

[web2py] Re: MongoDB Adapter error in select

2012-05-10 Thread kokoyo
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) ])

Re: [web2py] Re: MongoDB Adapter error in select

2012-05-10 Thread Francisco Costa
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

[web2py] Re: MongoDB Adapter error in select

2012-05-10 Thread Massimo Di Pierro
Please try trunk again. On Thursday, 10 May 2012 01:03:22 UTC-5, kokoyo 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),

[web2py] Re: MongoDB Adapter error in select

2012-05-10 Thread Francisco Costa
Still not working. I think Fields order is wrong. At the end of the select() function I write this: a = [] for f in fields: a.append(f.type) return dict(rows=rows, fields=a, colnames=colnames) and I got this: colnames: city age _id name fields: id text

[web2py] Re: MongoDB Adapter error in select

2012-05-10 Thread Massimo Di Pierro
This helps. I have another attempt to fix this in trunk. Hard to test it since I do not have mongodb installed. On Thursday, 10 May 2012 08:39:22 UTC-5, Francisco Costa wrote: Still not working. I think Fields order is wrong. At the end of the select() function I write this: a = []

[web2py] Re: MongoDB Adapter error in select

2012-05-10 Thread Francisco Costa
Just add a '\' at the end of line 4664 and your are done! Great job Massimo! On Thursday, May 10, 2012 9:12:48 PM UTC+1, Massimo Di Pierro wrote: This helps. I have another attempt to fix this in trunk. Hard to test it since I do not have mongodb installed. On Thursday, 10 May 2012

[web2py] Re: MongoDB Adapter error in select

2012-05-10 Thread Francisco Costa
I found another problem!! if you do this: mongo.user.insert(name='Jim', age=18, city='Detroit') mongo.user.insert(name='Jack', age=18) and then select users = mongo(mongo.user.age==18).select() you don't have the field city in one of the rows, so you get this error: users =

[web2py] Re: MongoDB Adapter error in select

2012-05-10 Thread Massimo Di Pierro
What's the model? On Thursday, 10 May 2012 16:27:51 UTC-5, Francisco Costa wrote: I found another problem!! if you do this: mongo.user.insert(name='Jim', age=18, city='Detroit') mongo.user.insert(name='Jack', age=18) and then select users = mongo(mongo.user.age==18).select()

[web2py] Re: MongoDB Adapter error in select

2012-05-10 Thread Francisco Costa
i didn't understand your question.. This is the complete code import sys import time from gluon.dal import DAL, Field mongo = DAL('mongodb://localhost:27017/sapo') mongo.define_table('user', Field('name', 'text'), Field('age', 'integer'),

[web2py] Re: MongoDB Adapter error in select

2012-05-10 Thread Massimo Di Pierro
Now I understand better where all these problems come from. I shall fix it tonight. On Thursday, 10 May 2012 18:02:24 UTC-5, Francisco Costa wrote: i didn't understand your question.. This is the complete code import sys import time from gluon.dal import DAL, Field mongo =

[web2py] Re: MongoDB Adapter error in select

2012-05-09 Thread Francisco Costa
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

[web2py] Re: MongoDB Adapter error in select

2012-05-09 Thread kokoyo
Hi Costa , first im sorry for my wrong post above,It should be a new post with new question. Actually i have same problem like you, i did a quick test and have not solved this issue yet, here is what i did: set driver to use mongodb in: DB.py : if not request.env.web2py_runtime_gae: ## if

[web2py] Re: MongoDB Adapter error in select

2012-05-09 Thread Francisco Costa
Lets hope Massimo fix that today in trunk On Wednesday, May 9, 2012 12:28:50 PM UTC+1, kokoyo wrote: Hi Costa , first im sorry for my wrong post above,It should be a new post with new question. Actually i have same problem like you, i did a quick test and have not solved this issue yet,

[web2py] Re: MongoDB Adapter error in select

2012-05-09 Thread kokoyo
Seems DAL alway looks the first column if all tables is ID field (after remove _id column from mongo) { _id : ObjectId(4de83c816afb62e8367163b1), first_name : koko, last_name:yo, password } * * On Wednesday, May 9, 2012 7:42:56 PM UTC+9, Francisco Costa wrote: I've enumerated fields

[web2py] Re: MongoDB Adapter error in select

2012-05-09 Thread Massimo Di Pierro
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

[web2py] Re: MongoDB Adapter error in select

2012-05-08 Thread Francisco Costa
Now i get 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

[web2py] Re: MongoDB Adapter error in select

2012-05-08 Thread kokoyo
Hello, i got this error when tried pymongo and web2py: On Linux: type 'exceptions.ImportError' cannot import name son . rows = self.dbset(field == value, ignore_common_filters = self.ignore_common_filters).select(limitby=(0, 1)) File /home/kokoyo/webapps/w2p/web2py/gluon/dal.py, line

[web2py] Re: MongoDB Adapter error in select

2012-05-07 Thread Massimo Di Pierro
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

[web2py] Re: MongoDB Adapter error in select

2012-05-07 Thread Francisco Costa
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

[web2py] Re: MongoDB Adapter error in select

2012-05-07 Thread Massimo Di Pierro
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

[web2py] Re: MongoDB Adapter error in select

2012-05-07 Thread Francisco Costa
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,fields,attributes) File /opt/web2py/gluon/dal.py, line 4711, in select return processor(rows,columns,False)

[web2py] Re: MongoDB Adapter error in select

2012-05-07 Thread Massimo Di Pierro
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,fields,attributes) File

[web2py] Re: mongodb adapter not working

2012-03-07 Thread rdodev
Problem solved. I was using binary distro that doesn't look for installed python modules. Running form source solves the problem. On Wednesday, March 7, 2012 10:25:35 AM UTC-5, rdodev wrote: I'm running the nightly build of web2py, python 2.7, have pymongo installed and mongodb is running.

[web2py] Re: mongodb and web2py

2011-12-03 Thread lyn2py
mongodb gets a lot of attention, has a fairly large userbase and even dedicated database hosting for scalability. They do a lot of marketing to expand their userbase from Rails to Django to PHP users are using it! I think it is fair that they want to work on the mongodb adapter. It will help

[web2py] Re: MongoDB testing and development

2011-10-28 Thread Mark Breedveld
Found another error, but I can't figure out an solution. But it must be rather simple. I use the following model and without auth ofcourse if not request.env.web2py_runtime_gae: ## if NOT running on Google App Engine use SQLite or other DB dbp =

[web2py] Re: MongoDB testing and development

2011-10-21 Thread Massimo Di Pierro
yes. On Oct 21, 2:55 am, Mark Breedveld m.breedv...@solcon.nl wrote: Dear Massimo, I downloaded the trunk and I am currently testing the MongoDB Adapter and I can tell that inserting currently isn't working. Also the creation of tables doesn't work. First question, shall I put the bugs and

[web2py] Re: MongoDB and Web2py

2011-10-12 Thread Francisco Costa
we use the DAL for MySQL and pymongo for MongoDB We are changing everything to MongoDS, so we have some interest in being able to write MongoDB queries trough the DAL so we woulnd't have to change lots of code On Oct 3, 9:57 am, ~redShadow~ redsha...@hackzine.org wrote: On Sun, 2011-10-02 at

[web2py] Re: MongoDB and Web2py

2011-10-12 Thread David Marko
Hi Francisco, how do you manage the connection to MongoDB server? Do you establish and close connection on every request or do you use some connection pooling ?

[web2py] Re: MongoDB and Web2py

2011-10-12 Thread Francisco Costa
On Oct 12, 11:00 am, David Marko dma...@tiscali.cz wrote: Hi Francisco, how do you manage the connection to MongoDB server? Do you establish and close connection on every request or do you use some connection pooling ? Hi Marko, for now we are using pymongo like this: from pymongo import

[web2py] Re: MongoDB and Web2py

2011-10-12 Thread David Marko
Assume this code is in some db.py file ... so its executed on every request ...?

[web2py] Re: MongoDB and Web2py

2011-10-12 Thread Francisco Costa
we use it in db.py, not sure where should be the optimal way for it On Oct 12, 11:52 am, David Marko dma...@tiscali.cz wrote: Assume this code is in some db.py file ... so its executed on every request ...?

[web2py] Re: MongoDB and Web2py

2011-10-12 Thread David Marko
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

[web2py] Re: MongoDB and Web2py

2011-10-12 Thread Tiago Moutinho
On Oct 12, 12:07 pm, David Marko dma...@tiscali.cz wrote: Massimo adviced me to use something like this previsously: def make_connection():      from pymongo import Connection      connection = Connection('localhost', 27017)      return connection connection =

[web2py] Re: MongoDB and Web2py

2011-10-12 Thread David Marko
Both can be in db.py file and so available for entire application = to other db_xx.py files and controlers ... the same thing as standard 'db' sql connection variable defined in db.py by default.

[web2py] Re: MongoDB and Web2py

2011-10-12 Thread Jay
Here is what I use (in a file models/0.py): import pymongo from pymongo import ASCENDING, DESCENDING def make_mongo_connection(): mdb = pymongo.Connection() return mdb mdb = cache.ram('mongodb', make_mongo_connection, 0) # in the code I use mdb as needed. # On a busy site, it may make

[web2py] Re: MongoDB and Web2py

2011-10-12 Thread David Marko
Shouldnt the cache.ram('mongodb', make_mongo_connection, 0) has the None instead of 0? Having 0 it doesnt work as a cache as it refreshes connection on each request ...

Re: [web2py] Re: MongoDB and Web2py

2011-10-12 Thread ~redShadow~
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 =

[web2py] Re: MongoDB and Web2py

2011-10-02 Thread Massimo Di Pierro
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

Re: [web2py] Re: MongoDB and Web2py

2011-10-02 Thread Bruno Rocha
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

[web2py] Re: MongoDB and Web2py

2011-10-02 Thread Massimo Di Pierro
I am confused. Did you use db = DAL('mongodb://') db.define_table() db.mytable.insert() or just the mongodb api? On Oct 2, 5:53 pm, Bruno Rocha rochacbr...@gmail.com wrote: I used that for some samples and talks, also for a small project. as I I am not doing advanced operations I

[web2py] Re: MongoDB supported by DAL

2011-09-29 Thread Francisco Costa
Are you planning to resume development? I'd need the MongoDBAdapter for a project, and I am willingly to cooperate. I'm quite new both to MongoDB and web2py but I'm learning fast; the only problem I see is the apparent lack of documentation on which methods an adapter should implement and

[web2py] Re: MongoDB supported by DAL

2011-09-28 Thread Samuele Santi
On Aug 8, 3:30 pm, DenesL denes1...@yahoo.ca wrote: I was, a while back, just before the new dal. The changes in the dal plus a busier work day conspired to kill the effort. On Aug 7, 1:54 pm, Francisco Costa m...@franciscocosta.com wrote: Is anyone working on the MongoDBAdapter? Are you

[web2py] Re: MongoDb and web2py

2011-09-13 Thread dpreston
My understanding is that pymongo has connection pooling builtin. - http://api.mongodb.org/python/current/api/pymongo/connection.html Also, it appears that an addition to the cache method described by Massimo enables the use replica sets as well. You still need to handle AutoReconnect exceptions

[web2py] Re: MongoDb and web2py

2011-08-13 Thread Karthik
I'm still looking for a solution to simulate connection pooling, any responses would be great - thanks! On Jul 21, 4:53 pm, Karthik karthikparameswa...@gmail.com wrote: Hi Massimo, Thanks for this. Do you know if it will hold up in a high performance situation though? As in, if multiple

[web2py] Re: MongoDB supported by DAL

2011-08-08 Thread DenesL
I was, a while back, just before the new dal. The changes in the dal plus a busier work day conspired to kill the effort. On Aug 7, 1:54 pm, Francisco Costa m...@franciscocosta.com wrote: Is anyone working on the MongoDBAdapter?

  1   2   >