In Chameleon's template.py file there's a cook(self, body)
function and the problem I have occurs during executing this line:
program = self._cook(body, digest, names)
And this will lead to _cook(self, body, digest, buildins)
function and the line
source = self._make(body, buildins)
I am using PyCharm and I have two python2.7 interpreters. They both work if I just run the pyramid program. And they both can connect to pydev debugger when run in debug mode. However, one of them ('bad' interpreter) will have the following error when handling a request in debug mode.
ImportError: cannot import name pydev_debugger_exc_info
I tried to dig further and I found that when I use the 'good' interpreter, my template .pt file will be cooked into a .py temp file/object (source) with the starting line as
from sys import exc_info as _exc_info
which will work just fine. While the 'bad' interpreter will end up with the following as the first line.
from _pydev_imps._pydev_sys_patch import pydev_debugger_exc_info as _pydev_debugger_exc_info
I have also tried to use other versions of pramid/chameleon etc but ended up having the same problem. I know the different behaviors are caused by two different python 2.7 interpreters. But I really don't know how to dig further. So, any help or advice is very much appreciated.