Pysimplegui: [Bug] EasyPrint,Print,eprint出现问题

创建于 2019-09-26  ·  4评论  ·  资料来源: PySimpleGUI/PySimpleGUI

问题类型(增强,错误,错误,问题)

漏洞

操作系统

Windows 7专业版

Python版本

3.7.4

PySimpleGUI端口和版本

4.4.1

导致问题的代码或部分代码

    while True:
        sg.Print("Hello World")
        event, values = window.Read(timeout=50)

我收到以下错误消息

Traceback (most recent call last):
  File "C:/***/app.py", line 52, in <module>
    sg.Print("Hello World")
  File "D:\Python\Python37-32\lib\site-packages\PySimpleGUI\PySimpleGUI.py", line 9273, in EasyPrint
    DebugWin.debug_window.Print(*args, end=end, sep=sep)
  File "D:\Python\Python37-32\lib\site-packages\PySimpleGUI\PySimpleGUI.py", line 9227, in Print
    self.Close()
  File "D:\Python\Python37-32\lib\site-packages\PySimpleGUI\PySimpleGUI.py", line 9243, in Close
    self.window.__del__()
AttributeError: 'Window' object has no attribute '__del__'

我所做的是

D:\ Python \ Python37-32 \ Lib \ site-packages \ PySimpleGUI \ PySimpleGUI.py

我从中修改了line 9240

    def Close(self):
        """ """
        self.window.Close()
        self.window.__del__()
        self.window = None

对此:

    def Close(self):
        """ """
        self.window.Close()
        # self.window.__del__()
        self.window = None

它解决了问题。

不过你能自己检查一下吗。

谢谢你的帮助。

顺便说一句,PySimpleGui是一项了不起的工作!

Bug Done - Download from GitHub

所有4条评论

错过了一个。 会很快修复..谢谢。 您发表的重要文章

固定并上传到GitHub

对于那个很抱歉!

亲爱的PySimpleGUI

请给我一些帮助。

我应该怎么做才能解决此问题?

我应该如何从GitHub下载它?

感谢您的提前帮助。

PyPI的更新为您解决了吗?

此页面是否有帮助?
0 / 5 - 0 等级