Seems to be working now. Thanks Anthony On Monday, October 3, 2016 at 11:29:52 AM UTC-5, Anthony wrote: > > The issue: https://github.com/web2py/web2py/issues/1485 > > On Monday, October 3, 2016 at 12:17:15 PM UTC-4, Anthony wrote: >> >> Actually, we broke it here: >> https://github.com/web2py/web2py/commit/b4acfd0724845633f667a55e593a15576379554d >> . >> >> Previously, response._view_environment was created at the end of >> build_environment, and then again very shortly thereafter in >> serve_controller (right after executing the models). We thought we could >> get rid of the line in build_environment, but it turns out that creates a >> problem for the scheduler (and presumably the shell), as the application >> code is executed via shell.env rather than serve_controller in those cases. >> >> I'll open an issue and propose a fix. >> >> Anthony >> >> On Monday, October 3, 2016 at 5:48:40 AM UTC-4, Niphlod wrote: >>> >>> hum. Trunk has been recently updated in the management of caching code >>> for controllers and views .... wonder if this is related to that. >>> >>> On Monday, October 3, 2016 at 5:15:18 AM UTC+2, Brian M wrote: >>>> >>>> OK, so I've had multiple scheduled tasks running for years that use >>>> response.render('path/to/template.html', dict(var= 'something')) to help >>>> build email bodies and it has been working perfectly. Now when I try to >>>> upgrade to the latest web2py trunk (was on 2.13.4 - yeah I'm a bit behind) >>>> all that has stopped working. Below is the error I'm getting >>>> File "C:\FMSC Webapps\web2py_master\gluon\globals.py", line 437, in >>>> render >>>> self._view_environment.update(self._vars) >>>> AttributeError: 'NoneType' object has no attribute 'update' >>>> >>>> Why isn't this working anymore? Has some backwards >>>> compatibility breaking change been made to the scheduler environment? Any >>>> advice would be much appreciated. >>>> >>>> -Brian >>>> >>>> PS. I've seen >>>> https://groups.google.com/forum/#!searchin/web2py/response.render$20scheduler|sort:relevance/web2py/UsUvODL07zs/HrcCsxQcCQAJ >>>> >>>> which would seem related but I'm unable to get it working by just adding >>>> from gluon.template import render >>>> >>>
-- 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.

