Good day! I am learning PyQt5 and trying to write a simple dictionary. The program starts, but when you close it, the message "Python program terminated" appears. 
The code is:
import datrie from PyQt5 import QtCore, QtGui from PyQt5.QtWidgets import QApplication, QWidget, QMessageBox from ui_dict_form import UiDictForm class DictWindow(QWidget, UiDictForm): def __init__(self, parent=None): QWidget.__init__(self, parent) self.setup_ui(self) self.setLayout(self.gridLayout) self.dict = datrie.Trie.load('file_dict.dict') def closeEvent(self, event): reply = QMessageBox.question(self, 'Message', "Вы действительно хотите выйти?", QMessageBox.Yes | QMessageBox.No, QMessageBox.No) if reply == QMessageBox.Yes: self.close() else: event.ignore() if __name__ == '__main__': import sys app = QApplication(sys.argv) window = DictWindow() window.show() sys.exit(app.exec_()) At the moment, I realized that such a message appears when there is such a line in the code: self.dict = datrie.Trie.load('file_dict.dict') , but if you remove / comment it out, then such a message does not appear. I use Windows 7 64bit, Python 3.5, PyQt5. Help to understand / get rid of this problem.
