q463643865
like sunshine
采纳率0%
2019-03-03 19:08

Python运行ride.py报错

各位大佬,小白请教一个问题,我在cmd命令下运行ride.py的时候报如下错,能否帮忙看下,小白谢谢各位大佬了~!
E:\Python27\Scripts>python ride.py
Traceback (most recent call last):
File "E:\Python27\lib\site-packages\robotide__init__.py", line 83, in main
run(inpath, not noupdatecheck, debug_console)
File "E:\Python27\lib\site-packages\robotide\
_init__.py", line 102, in run
from robotide.application import RIDE
File "E:\Python27\lib\site-packages\robotide\application\
_init__.py", line 16, in
from .application import RIDE, Project
File "E:\Python27\lib\site-packages\robotide\application\application.py", line 22, in
from robotide.namespace import Namespace
File "E:\Python27\lib\site-packages\robotide\namespace__init__.py", line 16, in
from .namespace import Namespace
File "E:\Python27\lib\site-packages\robotide\namespace\namespace.py", line 31, in
from robotide.publish import PUBLISHER, RideSettingsChanged, RideLogMessage
File "E:\Python27\lib\site-packages\robotide\publish__init__.py", line 123, in
from .messages import *
File "E:\Python27\lib\site-packages\robotide\publish\messages.py", line 21, in
from .messages2 import *
File "E:\Python27\lib\site-packages\robotide\publish\messages2.py", line 24, in
from robotide.publish import publisher
File "E:\Python27\lib\site-packages\robotide\publish\publisher.py", line 24, in
from pubsub import pub
ImportError: cannot import name pub

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

2条回答

  • Kiloveyousmile Kiloveyousmile 2年前

    错误在最后三句:

    File "E:\Python27\lib\site-packages\robotide\publish\publisher.py", line 24, in 
    from pubsub import pub
    ImportError: cannot import name pub
    

    导入出错了。应该是你的文件导入顺序有误,具体可以参考下面这篇文章检查一下:
    https://segmentfault.com/a/1190000010600365

    点赞 评论 复制链接分享
  • mengxin100hao mengxin100hao 7月前

    出现相同的问题,是未安装Pypubsub导致,pip install Pypubsub安装成功后,问题解决,已实践

    点赞 评论 复制链接分享

相关推荐