#1163 NameError: Error calling Python override of QWidget::closeEvent(): name 'None0' is not defined

106.39* Posted at: 6 days ago 👁26

Traceback (most recent call last):
File "/Users/mac/PycharmProjects/PythonProject/pyvideotrans/sp.py", line 167, in

QTimer.singleShot(1000, lambda: start_window.close())

File "/Users/mac/PycharmProjects/PythonProject/pyvideotrans/sp.py", line 96, in closeEvent

self.pixmap = None0

NameError: Error calling Python override of QWidget::closeEvent(): name 'None0' is not defined


=
system:macOS-26.0.1-arm64-arm-64bit
version:v3.82
frozen:False
language:zh
root_dir:/Users/mac/PycharmProjects/PythonProject/pyvideotrans
Python: 3.10.17 (main, Apr 8 2025, 12:10:59) [Clang 17.0.0 (clang-1700.0.13.3)]

1 Replies

这是一个代码错误,在 sp.py 文件的第96行存在语法错误:self.pixmap = None0。正确的写法应该是 self.pixmap = None

请按以下步骤修复:

  1. 打开文件 /Users/mac/PycharmProjects/PythonProject/pyvideotrans/sp.py
  2. 找到第96行,将 self.pixmap = None0 修改为 self.pixmap = None
  3. 保存文件后重新启动软件。

如果问题仍然存在,请确保您使用的是最新的源代码版本。

Post Your Reply
Open source and free maintenance is not easy. If this project is helpful to you, please consider making a small donation to help the project continue to maintain and update.

Donate: https://ko-fi.com/jianchang512

Trending Questions