[web2py] Re: cache.action decorator generates an error
I cloned repo from github, and now I get: type 'exceptions.UnboundLocalError'> local variable 'expires' referenced before assignment I guess something was fixed, but something else got broken? More details: File "/opt/web2py/gluon/cache.py", line 680, in wrapped_f 'Expires' : expires, UnboundLocalError: local variable 'expires' referenced before assignment Regards, Krzysztof. On Saturday, October 17, 2015 at 4:39:44 AM UTC+2, Massimo Di Pierro wrote: > > This may be fixed in trunk. Can you please check it. > > On Wednesday, 14 October 2015 13:03:01 UTC-5, Krzysztof Socha wrote: >> >> Hi, >> >> I am trying to configure caching on my site, but it does not seem to >> work. As soon as I use the cache.action decorator, such as: >> >> @cache.action(time_expire=0,cache_model=cache.ram) >> >> for any action in the controller, I get an exception thrown with: >> >> *'session_' local variable referenced before assignment* >> >> It works with *cache_model=None*, but this is not exactly what I >> want >> >> web2py version: >> >> 2.12.3-stable+timestamp.2015.08.19.00.18.03 >> (Running on nginx/1.4.6, Python 2.7.6) >> >> Any thoughts on this? >> >> Regards, >> Krzysztof. >> > -- 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.
[web2py] Re: cache.action decorator generates an error
Just a little add-on: it seems now to work fine, if *time_expire>0*. It only fails for *time_expire=0*. So I guess it is an improvement :) When will this be fixed in a stable release? Or should I use the github version for my production server? Cheers, Krzysztof. On Saturday, October 17, 2015 at 5:56:20 PM UTC+2, Krzysztof Socha wrote: > > I cloned repo from github, and now I get: > > type 'exceptions.UnboundLocalError'> local variable 'expires' referenced > before assignment > > I guess something was fixed, but something else got broken? More details: > > File "/opt/web2py/gluon/cache.py", line 680, in wrapped_f > 'Expires' : expires, > UnboundLocalError: local variable 'expires' referenced before assignment > > > Regards, > Krzysztof. > > On Saturday, October 17, 2015 at 4:39:44 AM UTC+2, Massimo Di Pierro wrote: >> >> This may be fixed in trunk. Can you please check it. >> >> On Wednesday, 14 October 2015 13:03:01 UTC-5, Krzysztof Socha wrote: >>> >>> Hi, >>> >>> I am trying to configure caching on my site, but it does not seem to >>> work. As soon as I use the cache.action decorator, such as: >>> >>> @cache.action(time_expire=0,cache_model=cache.ram) >>> >>> for any action in the controller, I get an exception thrown with: >>> >>> *'session_' local variable referenced before assignment* >>> >>> It works with *cache_model=None*, but this is not exactly what I >>> want >>> >>> web2py version: >>> >>> 2.12.3-stable+timestamp.2015.08.19.00.18.03 >>> (Running on nginx/1.4.6, Python 2.7.6) >>> >>> Any thoughts on this? >>> >>> Regards, >>> Krzysztof. >>> >> -- 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.
[web2py] Re: cache.action decorator generates an error
This may be fixed in trunk. Can you please check it. On Wednesday, 14 October 2015 13:03:01 UTC-5, Krzysztof Socha wrote: > > Hi, > > I am trying to configure caching on my site, but it does not seem to work. > As soon as I use the cache.action decorator, such as: > > @cache.action(time_expire=0,cache_model=cache.ram) > > for any action in the controller, I get an exception thrown with: > > *'session_' local variable referenced before assignment* > > It works with *cache_model=None*, but this is not exactly what I want > > web2py version: > > 2.12.3-stable+timestamp.2015.08.19.00.18.03 > (Running on nginx/1.4.6, Python 2.7.6) > > Any thoughts on this? > > Regards, > Krzysztof. > -- 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.