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

Pycharm 升级到最新版之后运行 unittest 报错。python

报错信息:

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

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

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


这是一个已知问题,从2016.2版本就存在,目前为止还没解决。BUGspa

目前的解决办法是使用旧的utrunner.py替换新的utrunner.py.net

解决办法:

STEP1. 打开 pycharm 目录code

open /Applications/PyCharm\ CE.app/Contents/helpers/pycharm11

STEP2. 下载旧的utrunner.pyblog

STEP3. 用旧的utrunner.py替换pycharm目录下的utrunner.pyget

而后问题解决。pycharm


转载自:http://blog.csdn.net/wirelessqa/article/details/53465854

相关文章
相关标签/搜索