连接pycharm远程调试器时如何避免“Name're'未定义”错误?

时间:2014-01-31 21:21:08

标签: python pycharm python-import

从我的代码中删除一行正则表达式后,我在连接PyCharm的远程调试器时开始在控制台中收到此错误消息。在此之后,应用程序似乎正常工作(调试器连接并且代码正常运行),但我找不到此错误的来源。

我正在使用Python 2.7,使用PyCharm 2调试器。

Traceback (most recent call last):
      File "/usr/local/lib/python2.7/site-packages/pycharm-debug.egg/pydev/pydevd_comm.py", line 824, in doIt
        result = pydevd_vars.evaluateExpression(self.thread_id, self.frame_id, self.expression, self.doExec)
      File "/usr/local/lib/python2.7/site-packages/pycharm-debug.egg/pydev/pydevd_vars.py", line 406, in evaluateExpression
        Exec(expression, updated_globals, frame.f_locals)
      File "/usr/local/lib/python2.7/site-packages/pycharm-debug.egg/pydev/pydevd_exec.py", line 2, in Exec
        exec exp in global_vars, local_vars
      File "<string>", line 1, in <module>
    NameError: name 're' is not defined

如何解决这种情况?

0 个答案:

没有答案