how to debug web.py running under apache on production system?

84 views
Skip to first unread message

Suhas Patil

unread,
May 4, 2017, 9:46:59 AM5/4/17
to web.py

I am facing a peculiar problem. Every so often template rendering fails because path to the template is not found.  If I refresh the browser a few times (i.e. reexecute the same code) , the page is displayed. The code fails at the highlighted line in the template.py of web.py. When I checked the reason I found path variable was getting set to None. Any idea what is going on?

    def _load_template(self, name):

        kind, path = self._lookup(name)

        

        if kind == 'dir':

            return Render(path, cache=self._cache is not None, base=self._base, **self._keywords)

        elif kind == 'file':

            return Template(open(path).read(), filename=path, **self._keywords)

        else:

            raise AttributeError, "No template named " + name            

Suhas Patil

unread,
May 4, 2017, 9:48:31 AM5/4/17
to web.py
Is it possible to debug this code running under Apache on production machine? 
This problem never occurs on dev system.
Reply all
Reply to author
Forward
0 new messages