Massimo,

Further debugging I learnt that the derived Adapter classes like 
MySQLAdapter (and several others) call a method call "find_or_make_folder"

MongoDBAdapter does *not* call find_or_make_folder() - hence the 
self.folder remains None till the point it needs to be used.

*Is there a specific reason why databases folder is not required for Mongo 
?* (I saw that databases folder for mysql project has sql.log containin 
several SQL commands - I couldn't make sense of other files under there)

Is there a way to have a default uploadfolder value for MongoDBAdapter ? (I 
know I can pass it as an argument to DAL - but that is NOT default, that is 
user supplied)

-Mandar

On Wednesday, March 26, 2014 10:32:27 PM UTC+5:30, Mandar Vaze wrote:
>
> I think this might be a false alarm on my part.
> In another project I used mysql - where ( I assume) self._adapter.folder 
> is set - so default value is assigned within DAL code.
> My current project uses mongoDB - hence it is possible that for mongoDB 
> adapter doesn't set the .folder value - hence the error.
>
> That begs a question - should mongodb set the adapter.folder value ? 
>
> From the code it doesn't look like DB specific behaviour
>
> -Mandar
>
>
> On Wednesday, March 26, 2014 6:34:06 PM UTC+5:30, Mandar Vaze wrote:
>>
>> Documentation (
>> http://www.web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#Field-types)
>>  
>> says 
>> "uploadfolder defaults to the application's "uploads/" folder."
>>
>> Yet, the code (web2py™ Version 2.9.4-stable+timestamp.2014.03.05.04.44.09) 
>> defaults to "None" resulting into following error :
>>
>> /path/do/web2py/gluon/dal.py", line 9953, in store
>>     "you must specify a Field(...,uploadfolder=...)")
>>
>> am I doing something wrong ? Or it is just the case of "out of date" 
>> documentation.
>>
>> -Mandar
>>
>>
>>

-- 
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to