Yes I tried that too, it didn't help. but now for some reason I'm not 
getting the error any longer. Thanks.

On Saturday, March 22, 2014 3:12:32 PM UTC+2, Niphlod wrote:
>
> make sure the model is run AFTER the one holding the db 
> definition.........models are executed alphabetically.
>
> On Friday, March 21, 2014 9:28:14 PM UTC+1, Avi A wrote:
>>
>> Hi,
>> I'm trying to create a background job/function. I'm locating the file on 
>> the models directory, as I read on the book.
>> When I try to run the script manually, I get an error saying that db is 
>> not defined.
>> This is part of the code where I get the error:
>> ......
>> ......
>> catalog = csv.reader(webpage)
>> for row in catalog:
>>     item = db(db.t_items.unfi_product_== row[5]).select().first()
>>     if row > 0 and not item:
>>         ..........
>>
>>
>> Thanks.
>>
>>
>>

-- 
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.

Reply via email to