PyQt5报错Process finished with exit code -1073740791 (0xC0000409)
使用pyqt设计了一个界面,然后写了一个读取文件的函数,其中读取文件部分代码:
curPath = QDir.currentPath() # 获取系统当前目录
title = "打开一个文件"
filt = "文本文件(*.txt *.csv *.xlsx);;程序文件(*.h *.cpp *.py);;所有文件(*.*)"
fileName, flt = QFileDialog.getOpenFileName(self, title, curPath, filt)
链接到一个按钮,运行后在该界面点击按钮报错:
Process finished with exit code -1073740791 (0xC0000409)
以下的方法仅供参考,谨在此记录。
解决办法:
这个错误其实原因很多的,所以在pycharm打开,run > edit configuration > emulate terminal in output console勾上,再运行一次,立马提示出了什么错误。。。
我的错误:
即
TypeError: getOpenFileName(parent: QWidget = None, caption: str = ‘’, directory: str = ‘’, filter: str = ‘’, initialFilter: str = ‘’, options: Union[QFileDialog.Options, QFileDialog.Op
tion] = 0): argument 1 has unexpected type ‘Ui_MainWindow’
然后按照网上的方法把fileName, flt = QFileDialog.getOpenFileName(self, title, curPath, filt)
中的self
修改为None
,该错误就解决了
还有另外一种情况会导致PyQt5报错Process finished with exit code -1073740791 (0xC0000409)(以下错误来源于然终酒肆,在此记录,以防将来遇到不好查找)
这次查它报错 果不其然
这个控件名要有下划线的
PyQt5报错Process finished with exit code -1073740791 (0xC0000409)相关推荐
- python报错Process finished with exit code -1073740791 (0xC0000409)
情况一 也是网上较多的情况):(显卡)内存不足 这个时候,我们可以在pycharm里调一下内存: 按shift+ctrl+A ,搜索 其中: Xms128m中,Xms是指程序启动时所需要的内存,128 ...
- pyqt5运行出现Process finished with exit code -1073740791 (0xC0000409)
pyqt5运行出现Process finished with exit code -1073740791 <0xC0000409> 解决办法 控制台不显示具体除了什么错.网上去查大多数是深 ...
- Process finished with exit code -1073740791 (0xC0000409)报错解决方案
一.问题描述 使用Pycharm在跑一个深度学习网络时,出现以下报错: Process finished with exit code -1073740791 (0xC0000409) 二.问题分析 ...
- idea 报错Process finished with exit code 1
idea 报错Process finished with exit code 1 当运行测试类时提示找不到测试类 满脸问号 查询一堆解决方式时与我请况均不一致 最终发现问题: 建了两个Module其中 ...
- python中关于Process finished with exit code -1073740791 (0xC0000409)的解决办法
有些小伙伴在运行python程序的时候会遇到上图这种情况.对于这种情况不要着急,使用排除法很容易解决. 情况一(也是网上较多的情况):(显卡)内存不足 这个时候,我们可以在pycharm里调一下内存: ...
- TensorFlow 2+PyCharm显示“Process finished with exit code -1073740791 (0xC0000409)”
目录 大致现象 第一个坑:PyCharm不显示报错信息 第二个坑:解决"Could not locate zlibwapi.dll" 大致现象 TensorFlow.Keras中的 ...
- ”填坑“ -- springboot 启动报错 “Process finished with exit code 1”
pom文件中一个"0" 引发的血案 背景 近期使用spring boot2.0做新项目demo时,发现启动boot项目时,控制台什么错误日志都不显示,显示如下信息: Process ...
- 使用transforms.Normalize((0.5,), (0.5,))异常报错“Process finished with exit code -1073741676 (0xC0000094)”
目录 1 问题描述 2 EDA分析 3 解决方案 1 问题描述 今天在使用transforms.Normalize((0.5,), (0.5,))对MNIST数据集中的图像进行归一化时,程序执行到这里 ...
- 解决报错Process finished with exit code -1073741571 (0xC00000FD),修改栈大小
运行程序时程序意外终止,并返回提示: Process finished with exit code -1073741571 (0xC00000FD) 导致的原因是StackOverflow(栈区溢出 ...
- 记解决pycharm报错 Process finished with exit code -1073741819 (0xC0000005)
最近在做一个抢单项目: python项目莫名出现:Process finished with exit code -1073741819 (0xC0000005),程序没执行结束退出! . 网上找了好 ...
最新文章
- 经典面试题 | 讲一讲JVM的组成
- 放弃中国国籍 却赚着中国人的钱
- android报错及解决1--Bitmap加载时,报bitmap size exceeds VM budget
- harmonyos2.0测评,爆料:荣耀30 Pro开始测试华为鸿蒙HarmonyOS 2.0
- 页面头部title、description、keywords标签的优化
- 华为面试题算什么,这个背会了外企随便进
- JAVA学习笔记-this隐式参数
- 蓝桥每日真题之完全日期
- python采用函数式编程模式-浅谈Python 函数式编程
- 手撕源码之SpringApplication.java【Spring Boot 2.4.4】
- java二叉树删除节点
- 如果你没有钱,没有能力,没有人脉,你就这样干!
- 唐代:李白《将进酒》《行路难》《蜀道难》《送友人》
- 在浏览器输入URL,按下回车之后的流程
- CodeForces - 1538G Gift Set (二分)
- 0.《新概念51单片机C语言教程》(郭天祥)学习笔记
- oracle中创建复合索引方法
- Arduino Uno 实验4——电位器
- 2017软院金山WPS补题 L
- java sleep唤醒_详解Java中的线程让步yield()与线程休眠sleep()方法
热门文章
- 第十四章 开放条件下的宏观经济
- 【详解】指令系统中跳转指令与OF,SF,CF,ZF的关系
- ROS2安装时出现Connection failed [IP: 91.189.91.39 80]
- 如何获得onblur中的值_js中onfocus、onblur事件
- python与数据库实现报表的分组统计_报表排版与布局:数据分组和统计(RDL/页面报表)...
- aotorun专杀工具(U盘病毒专杀)
- 欢迎大家在这里提交CSDN博客程序出现的问题
- [专利与论文-12]:高级职称评定的面试和答辩注意事项
- 白鹭(egret)搜素引擎入门
- 智能指针手表_反对智能手表