【发布时间】:2018-08-08 21:13:10
【问题描述】:
我是 pudb 的新手。它在大多数情况下运行良好,但是当我尝试进入它显然无法识别的库时,我收到以下消息:
<no source code available>
If this is generated code and you would like the source code to show up here,
add it to linecache.cache, like
import linecache
linecache.cache[filename] = (size, mtime, lines, fullname)
You can also set the attribute _MODULE_SOURCE_CODE in the module in which this function
was compiled to a string containing the code.
我尝试过导入“linecache”,而“cache”属性是一个字典。我已尝试为缺少的模块创建条目几次,但均未成功。
有人可以举一个更简单和/或实用的方法来将无法识别的模块添加到 pudb 的示例吗?
【问题讨论】:
-
“无法识别的模块”是什么意思?你能举个例子吗?
-
就我而言,它是位于另一个目录中的模块 (PhidgetsPython/Phidgets/Devices/InterfaceKit.py)。脚本导入模块没有问题,但是pudb显然看不到。我尝试将该目录添加到我的 PYTHONPATH,但它似乎没有帮助。