working templates are not seen until apache restart

27 views
Skip to first unread message

Suhas Patil

unread,
Apr 27, 2017, 2:33:54 AM4/27/17
to web.py

I have a running installation and whenever I update templates, I restart apache.

Lately I am noticing that seemingly randomly I get template not found error with stack trace as below:

 File "/usr/local/lib/python2.7/dist-packages/web/application.py", line 239, in process

    return self.handle()

  File "/usr/local/lib/python2.7/dist-packages/web/application.py", line 230, in handle

    return self._delegate(fn, self.fvars, args)

  File "/usr/local/lib/python2.7/dist-packages/web/application.py", line 420, in _delegate

    return handle_class(cls)

  File "/usr/local/lib/python2.7/dist-packages/web/application.py", line 396, in handle_class

    return tocall(*args)

  File "/var/www/khojpal/tmain.py", line 433, in GET

    return kprenderNoBase.tasks(web.ctx.payload, actionsAllowed)

  File "/usr/local/lib/python2.7/dist-packages/web/template.py", line 1018, in __getattr__

    t = self._template(name)

  File "/usr/local/lib/python2.7/dist-packages/web/template.py", line 1012, in _template

    self._cache[name] = self._load_template(name)

  File "/usr/local/lib/python2.7/dist-packages/web/template.py", line 1002, in _load_template

    raise AttributeError, "No template named " + name + " at path: " + str(path)

AttributeError: No template named tasks at path: None


So it seems path variable is getting set to None and when I restart Apache, the same page that generated exception works fine. 


Any idea on how I can fix this?


Thanks in advance.


Suhas Patil

http://www.selfie180.com/ "Selfie with a twist!"

Reply all
Reply to author
Forward
0 new messages