Python PyUIC Error: one input ui-file must be specified

这篇具有很好参考价值的文章主要介绍了Python PyUIC Error: one input ui-file must be specified。希望对大家有所帮助。如果存在错误或未考虑完全的地方,请大家不吝赐教,您也可以点击"举报违法"按钮提交疑问。

这个问题的出现是将desinger中的ui界面转换成代码是出现的错误,如图
pyuic转换ui报错,Python,ui
这个错误有两种情况,网上博客大部分提到了第一种,有关配置的问题,PyUIC的配置出现错误,有很多很多博客细节的讲解了这个问题,我这里展示一下两种配置方法,都是可以用而且没问题的

Name: Pyuic
Group: Qt
Program: Python环境目录\python.exe所在目录
Parameters: -m PyQt5.uic.pyuic $FileName$ -o $FileNameWithoutExtension$.py
Working directory: $FileDir$

第二种

Name: Pyuic
Group: Qt
Program: Python环境目录\Scripts\pyuic5.exe
Parameters: $FileName$ -o 
$FileNameWithoutExtension$.py
$FileNameWithoutExtension$.py
Working directory: $FileDir$

这种错误很普遍,这里不再赘述。

这里还有另一种情况,是UI界面的命名不规范导致的
这个一般不会出错,但是我的desinger当时自动生成的就有空格,而且网上介绍这方面的内容较少,所以卡了半天WWW
pyuic转换ui报错,Python,ui
这里第一个Dialog - untitled.ui是会报错Error: one input ui-file must be specified但是下面的untitled.ui就不会报错,因为前者出现了空格
我后来测试了一下加下划线等链接符的命名方式,不会出错。
所以这里一定要注意不加空格。
新人初学PyUIC,如有错误的地方,还希望大佬们多多指正。
return code;文章来源地址https://www.toymoban.com/news/detail-719294.html

到了这里,关于Python PyUIC Error: one input ui-file must be specified的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请点击违法举报进行投诉反馈,一经查实,立即删除!

领支付宝红包 赞助服务器费用

相关文章

  • TypeError: linear(): argument ‘input‘ (position 1) must be Tensor, not numpy.ndarray

    错误:TypeError: linear(): argument ‘input’ (position 1) must be Tensor, not numpy.ndarray 这个错误通常表示您在使用torch.nn.Linear()函数时,将一个numpy数组传递给了该函数,而不是一个Tensor对象。 torch.nn.Linear()函数是用于创建线性层的函数。在PyTorch中,所有的操作都必须使用Tensor对象来完成

    2024年02月15日
    浏览(41)
  • Linux服务器报错解决The git executable must be specified in one of the following ways: - be included in

    在利用深度学习服务器,利用Xshell进入端口,想要运行深度学习项目时碰到了以下错误: Traceback (most recent call last):   File \\\"/opt/conda/envs/[yolov5_SE]/lib/python3.9/site-packages/git/__init__.py\\\", line 166, in module     refresh()   File \\\"/opt/conda/envs/[yolov5_SE]/lib/python3.9/site-packages/git/__init__.py\\\", line

    2024年02月02日
    浏览(38)
  • MySQL 建表报错:Incorrect table definition; there can be only one auto column and it must be defined as a

    示例 :表中有两个列,id、real_id,id 列只想作为记录的序号存储(如需要保持排序的记录),real_id 列则是记录真正的主键。所以将 id 列设为自增列,方便,不需要程序控制序号递增。建表语句如下: 现象 :建表报错,报错信息: Incorrect table definition; there can be only one aut

    2024年02月13日
    浏览(36)
  • Mysql建表报错:Incorrect table definition; there can be only one auto column and it must be defined as a

    报错:          Incorrect table definition; there can be only one auto column and it must be defined as a key. 原因:         建表语句错误,表中只能包含一个自增列,且该列必须为键。问题是虽然这个表设置了其它主键,但是报错的建表语句中没有把自增列设为键导致的。

    2024年02月15日
    浏览(43)
  • configure: error: cannot guess build type;you must specify one

    该问题一般出现在国产平台,从错误描述来看,意思是:无法猜测build类型,你必须指定一个。 解决办法: 1. 在系统/usr路径下搜索 config.guess 和 config.sub 这两个文件。 2. 在当前编译工具目录下同样搜索 config.guess 和 config.sub 这两个文件。 3. 用系统的 config.guess 和 config.sub 文件

    2024年02月11日
    浏览(47)
  • Build input file cannot be found: .pch

    xcode真机运行时,报错: Build input file cannot be found: /Users/mac/Desktop/projects/xxx/xxx.pch 实际查看发现,项目中的.pch文件存在,但运行时报错。修改配置里的.pch文件路径后,正常。

    2024年02月13日
    浏览(25)
  • Error: Header name must be a valid HTTP token [“授权“]

    使用SpringSecurity和OAuth时出现的问题   postman一直报错: 原因:postman使用的是汉化版本  当选择为 Basic Auth时 自动生成的头对应的key和value为: 授权: Basic + base编码      导致header中key为中文 发送失败 解决方法:  1 (推荐) 不使用汉化的postman 2 不用在Basic Auth中输入 账号和密码 直

    2024年02月11日
    浏览(28)
  • 成功解决使用BCEWithLogitsLoss时ValueError: Target size (torch.Size([4])) must be the same as input size (to

    成功解决使用BCEWithLogitsLoss时ValueError: Target size (torch.Size([4])) must be the same as input size (torch.Size([4, 1])) 🌈 个人主页:高斯小哥 🔥 高质量专栏:Matplotlib之旅:零基础精通数据可视化、Python基础【高质量合集】、PyTorch零基础入门教程👈 希望得到您的订阅和支持~ 💡 创作高质量

    2024年03月11日
    浏览(60)
  • 已解决ValueError: Excel file format cannot be determined, you must specify an engine manually.

    已解决ValueError: Excel file format cannot be determined, you must specify an engine manually. 粉丝群里面的一个小伙伴遇到问题跑来私信我,想用Pandas读取Excel,但是发生了报错(当时他心里瞬间凉了一大截,跑来找我求助,然后顺利帮助他解决了,顺便记录一下希望可以帮助到更多遇到这个

    2024年02月02日
    浏览(28)
  • ERROR: There can be only one Game target per project.

    UATHelper: Packaging (Windows (64-bit)): ERROR: There can be only one Game target per project. D:dockIntermediateSource 把旧的文件删去 一般会出现在更改项目名称后 感谢 There can be only one Game target per project - Development Discussion / Content Creation - Unreal Engine ForumsThere can be only one Game target per project - 

    2024年02月08日
    浏览(38)

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

请作者喝杯咖啡吧~博客赞助

支付宝扫一扫领取红包,优惠每天领

二维码1

领取红包

二维码2

领红包