Pysimplegui: [ Bug] Problem with EasyPrint, Print, eprint

Created on 26 Sep 2019  路  4Comments  路  Source: PySimpleGUI/PySimpleGUI

Type of Issues (Enhancement, Error, Bug, Question)

Bug

Operating System

Windows 7 pro

Python version

3.7.4

PySimpleGUI Port and Version

4.4.1

Code or partial code causing the problem

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

I got the below error msg

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__'

What I did is

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

I modificated the line 9240 from this:

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

to that:

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

It solved the problem.

Could you check it by yourself though.

Thanks for your help.

Btw, PySimpleGui is an awesome work!

Bug Done - Download from GitHub

All 4 comments

Missed one. Will fix quickly.. Thank. You for great issue post

Fixed and uploaded to GitHub

Sorry about that!

Dear PySimpleGUI,

may I have some help.

What should I do to have this fix?

How should I download it from GitHub?

Thanks for your kind help in advance.

Has this been resolved for you with an update on PyPI?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

MikeTheWatchGuy picture MikeTheWatchGuy  路  5Comments

ECOM-Klaus picture ECOM-Klaus  路  4Comments

ihouses picture ihouses  路  6Comments

LBdN picture LBdN  路  6Comments

DKatarakis picture DKatarakis  路  6Comments