[web2py] Re: scheduler DAL object has no attribute

2018-08-23 Thread Yebach
mail_logger is defined in db.py What is interesting is that I am using the same code on two environments and on one it works ok the other causes problems The one that works is run from PyCharm (versuib 2.8.2) whereas scheduler is run from cmd as is also the function that starts the procedure

[web2py] Re: scheduler DAL object has no attribute

2018-08-22 Thread Anthony
Where and how is db.mail_logger defined? Is it possible either the code that defines it is not being run, or that the db object is being redefined after it has run? On Wednesday, August 22, 2018 at 8:34:08 AM UTC-4, Yebach wrote: > > Attaching code > > > #scheduler koda za pošiljanje mailov za s

[web2py] Re: scheduler DAL object has no attribute

2018-08-22 Thread Yebach
Attaching code #scheduler koda za pošiljanje mailov za stanje števcev def send_mail_stevci(first_reminder = False): dons = datetime.datetime.now() #a = True try: if dons.day in [22,25,28]: #if a: counters_data_oddani = db((db.counters.c_date.year() == dons

[web2py] Re: scheduler DAL object has no attribute

2018-08-22 Thread Anthony
Hard to say without seeing code. Obviously the mail_logger table is not defined in the context of the task being executed. Is it possible the db object is redefined somewhere in the code? On Wednesday, August 22, 2018 at 6:15:47 AM UTC-4, Yebach wrote: > > Hello > > I have a scheduler running so