您的位置:首页 > 其它

RuntimeWarning: Parent module '...' not found while handling absolute import

2017-03-21 10:28 459 查看
Pycharm 升级到最新版以后运行 unittest 报错。

报错信息:

RuntimeWarning: Parent module '...' not found while handling absolute import
import sysRuntimeWarning: Parent module '...' not found while handling absolute import
import timeRuntimeWarning: Parent module '...' not found while handling absolute import

这是一个已知问题,从2016.2版本就存在,目前为止还没解决。BUG目前的解决办法是使用旧的utrunner.py替换新的utrunner.py

解决办法:

STEP1. 打开 pycharm 目录
open /Applications/PyCharm\ CE.app/Contents/helpers/pycharm11
STEP2. 下载旧的utrunner.pySTEP3. 用旧的utrunner.py替换pycharm目录下的utrunner.py然后问题解决。
转载自:http://blog.csdn.net/wirelessqa/article/details/53465854
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  absolute import
相关文章推荐