[pyside] pyside-uic xxx.ui -o xxx_ui.py发生错误:An unexpected error occurred

今天在用pyside的时候,碰到一条命令

pyside-uic xxx.ui -o xxx_ui.py

可是执行它的时候,终端显示没有这条命令,

于是, 我马上想到,这应该是还没有安装的一个程序,

google了好一阵,原来,需要安装一个库,命名如下:

sudo apt-get install pyside-tools

灵感来源网址: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=545022

可是,执行 pyside-uic xxx.ui -o xxx_ui.py 依然报错:

An unexpected error occurred.

极其蛋疼的事情发生了, 经过经理点拨, 继续google,终于找到了如下信息, 一个字‘爽’:

Hi,



I'm working on KUbuntu 10.04, and issued the same problem as you do. As crazy as 

it seems, you can make it work by simply removing a file :

sudo rm /usr/lib/pymodules/python2.6/pysideuic/widget-plugins/__init__.py



It seems that the dynamic plugin loader is trying to execute it as if it was a 

plugin, but it is not, so removing it just works.

However, the exception generated by the script should be caught and not make 

everything fail, so maybe this problem should be reported to the PySide guys ?

灵感来源网址: http://lists.openbossa.org/pipermail/pyside/2010-October/001156.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值