*full traceback got from table scheduler_run :*
Traceback (most recent call last):
  File "/Users/MacBookPro/site/web2py/gluon/scheduler.py", line 313, in 
executor
    result = dumps(_function(*args, **vars))
  File "applications/mutualfunds/models/scheduler.py", line 14, in 
task_mail_investor_monthly_report
    return mutualfunds_scheduler.scheduler_0(rows_investor, subject)
  File "applications/mutualfunds/modules/mutualfunds_scheduler.py", line 
13, in scheduler_0
    dict(row_investor = row_investor, rows_account = rows_account) ) )
  File "/Users/MacBookPro/site/web2py/gluon/globals.py", line 453, in render
    run_view_in(self._view_environment)
  File "/Users/MacBookPro/site/web2py/gluon/compileapp.py", line 715, in 
run_view_in
    restricted(ccode, environment, layer)
  File "/Users/MacBookPro/site/web2py/gluon/restricted.py", line 240, in 
restricted
    raise RestrictedError(layer, code, output, environment)
RestrictedError: <type 'exceptions.NameError'> name 'locale' is not defined

*additional info*
- import python locale module already define in models/db.py, yet the other 
controller that use python locale module doesn't need to redefine the 
module again in view just the scheduler that need to redefine again on the 
view
- tried to put the function task_mail_investor_monthly_report in models and 
modules but got the same result.
- traceback is not from the view, just check the status of scheduler on 
table scheduler_task when i execute it, and monitoring it, when the status 
change into FAILED so i check the table scheduler_run to got the full error 
traceback to fix the error.
- and for the line that triggers it, not sure what do you mean, i assume 
about the controller for execute the scheduler.
*controllers/admin.py*
def task_scheduler():
scheduler.queue_task('task_mail_investor_monthly_report', prevent_drift = 
True, repeats = 0, 
period = 2592000 # 30 days = 2592000 seconds
)

thanks and best regards,
stifan

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