Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ Bug] Problem with EasyPrint, Print, eprint #2025

Closed
mozesa opened this issue Sep 26, 2019 · 4 comments
Closed

[ Bug] Problem with EasyPrint, Print, eprint #2025

mozesa opened this issue Sep 26, 2019 · 4 comments
Labels
Bug Something's not right Done - Install Dev Build (see docs for how) See https://docs.pysimplegui.com/en/latest/documentation/installing_licensing/upgrading/

Comments

@mozesa
Copy link

mozesa commented Sep 26, 2019

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!

@MikeTheWatchGuy
Copy link
Collaborator

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

@PySimpleGUI PySimpleGUI added Bug Something's not right Done - Install Dev Build (see docs for how) See https://docs.pysimplegui.com/en/latest/documentation/installing_licensing/upgrading/ labels Sep 26, 2019
@PySimpleGUI
Copy link
Owner

Fixed and uploaded to GitHub

Sorry about that!

@mozesa
Copy link
Author

mozesa commented Oct 17, 2019

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.

@mozesa mozesa closed this as completed Jan 7, 2020
@PySimpleGUI
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something's not right Done - Install Dev Build (see docs for how) See https://docs.pysimplegui.com/en/latest/documentation/installing_licensing/upgrading/
Projects
None yet
Development

No branches or pull requests

3 participants