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 issues (              
>       if column == '_id' and isinstance(record[column].objectid.ObjectId):
>
> I don't know python enough, but i think that line should be    if column 
> == '_id' and isinstance(record[column],bson.objectid.ObjectId):
>
>   File "/home/kris/web2py/gluon/dal.py", line 4634, in select
>     if column == '_id'
> AttributeError: 'ObjectId' object has no attribute 'objectid'
>
>
>
> There's also an issue with list:string as far as i can tell, 
> I have a record like this:
> {
> "title" : "mongo",
> "url" : "http://mongodb.org";,
> "upvotes" : 1,
> "downvotes" : 0,
> "tags" : [
> "kris",
> "mongo"
> ]
> }
>
> i put a debug statment and the list comes in as 
>  [u'kris', u'mongo'] which i believe bar_decode_string does not handle 
> correctly ( since its expeciting pipe seperated )
>
>   File "/home/kris/web2py/gluon/dal.py", line 1644, in parse_list_strings
>     value = bar_decode_string(value)
>   File "/home/kris/web2py/gluon/dal.py", line 5991, in bar_decode_string
>     return [x.replace('||', '|') for x in string_unpack.split(value[1:-1]) if 
> x.strip()]
> TypeError: expected string or buffer
>
> i changed that logic around 1644 to
>
>         if not self.dbengine=='google:datastore' and not 
> self.dbengine=='mongodb':
>
>
> the line numbers may be veyr slightly off as  i did add a debug statment 
> or two
>
>
>
>
>
>
>
>
> On Thursday, May 17, 2012 8:29:52 PM UTC-5, Massimo Di Pierro wrote:
>>
>> 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 from git.)
>>>
>>> The initial issue i ran into was not being able to import SON in dal.py 
>>> (i changed from pymongo to from bson and that fixed that)
>>>
>>> After that I ran into issues with pymongo.objectid, after a little 
>>> research I found this
>>> http://api.mongodb.org/python/2.0/api/pymongo/objectid.html
>>>
>>> references to pymongo.objectid should be replaced in favor of 
>>> bson.objectid
>>> when i did that in my local, everything started to work
>>>
>>> -Kris
>>>
>>>

Reply via email to