[web2py] Re: scheduler: imported unicodedata module in model not visible in a view

2012-10-11 Thread Massimo Di Pierro
Where is unicodedata.py located? On Thursday, 11 October 2012 10:56:50 UTC-5, Adi wrote: unicodedata module is accessible in a view when i test code directly from an application, but get the error when run the same code from scheduler. I can move the code up to a model (db_scheduler), but

[web2py] Re: scheduler: imported unicodedata module in model not visible in a view

2012-10-11 Thread Adi
this is the one that comes from python: http://docs.python.org/library/unicodedata.html (using it to clean out trademark and other symbols in order to send text as email) On Thursday, October 11, 2012 12:18:19 PM UTC-4, Massimo Di Pierro wrote: Where is unicodedata.py located? On

[web2py] Re: scheduler: imported unicodedata module in model not visible in a view

2012-10-11 Thread Niphlod
it's odd, but seems unrelated to scheduler. To help on further investigation, I managed to reproduce in shell. Append to standard db.py import unicodedata def testfunction(): return response.render('message.html', context=dict()) then, create views/message.html {{=XML('p%s/p' %

[web2py] Re: scheduler: imported unicodedata module in model not visible in a view

2012-10-11 Thread Massimo Di Pierro
There is a known problem with the custom_import, it does not work when import mymodule is called from the shell. Perhaps this is also a problem with the scheduler. It is in my todo list to fix it by the end of the week. On Thursday, 11 October 2012 14:20:37 UTC-5, Niphlod wrote: it's odd, but

[web2py] Re: scheduler: imported unicodedata module in model not visible in a view

2012-10-11 Thread Niphlod
Ok, look into that when you can. Just notice that the run_view_in can't see the unicodedata module, but in shell environment unicodedata is present, otherwise this unicodedata.normalize('NFKD', u'hi') u'hi' would have raised an exception On Thursday, October 11, 2012 10:46:17 PM UTC+2,