robertlugg / easygui

easygui for Python
http://easygui.readthedocs.org/en/master/
BSD 3-Clause "New" or "Revised" License
457 stars 116 forks source link

easygui crashes on many OSX machines #127

Open thomas-haslwanter opened 7 years ago

thomas-haslwanter commented 7 years ago

A number of my students use Mac OSX, and have reported that that current version of easygui reproducibly crashes on Mac-s. Attached are two crash reports, from different machines

crash_report_1.txt

crash_report_2.txt

ghost commented 6 years ago

Looks a little like the error I'm facing. Does the error happens every time someone type an special character? (like ˜ or ˆ)

zadacka commented 6 years ago

@thomas-haslwanter - apologies for the lack of any earlier response on this.

It does sound like it may be related to the issue that @gustavohmsilva is experiencing. I'm going to have a look into that (tracked as bug #139) and if we get a working solution we can see whether it fixes your issues also.

spyoungtech commented 6 years ago

@thomas-haslwanter could you include the entire code used to produce this error? Mainly, I'm curious what other packages you might be using along with easygui. Famously, matplotlib has an odd interaction with tkinter applications. If you are using matplotlib, see this SO question for a potential solution.

Also, be sure that these students are not using IDLE to try to run this code. IDLE itself is a tkinter app and attempting to run tkinter applications through IDLE, especially on Mac OS X, can cause some strange issues in my experience.

ghost commented 6 years ago

I Think I found a solution @thomas-haslwanter, @zadacka and @spyoungtech!

After A LOT of search I discovered some strange problem that Mac OS has with TK. Basically, the build that comes embedded with MAC OS of TCL/TK has a bug since 10.6 that don't play nice with some characters.

Python website recommend that you replace the original TCL/TK on MAC OS with another one that don't have the bug. After that, Python will automatically forward all TCL/TK use (easygui included) to the custom version you installed instead of the native pre build version o MAC OS.

Install this file: ActiveTcl8.5.18.0.298892-macosx10.5-i386-x86_64-threaded.dmg and you should stop receiving this problems. The link is below:

http://downloads.activestate.com/ActiveTcl/releases/8.5.18.0/

Please take close attention to the license from activestate, they are NOT open source and it may influence your work.

zadacka commented 6 years ago

Yup, to second what @gustavohmsilva has said. @thomas-haslwanter - if you get the chance to determine whether updating Tcl also resolves your issue that would be great. If it does not then we can do some more digging...

thomas-haslwanter commented 6 years ago

Thank you for looking into this issue. Currently I don't have a Mac available (it was a number of my students that had that problem), and I will look into it again during the spring semester. The problem with the suggested solution : it would require a modification of the python installation for each Mac user.

Thomas

Sent from Ninehttp://www.9folders.com/


From: Gustavo H M Silva notifications@github.com Sent: Wednesday, 17 January 2018 14:03 To: robertlugg/easygui Cc: Haslwanter Thomas; Mention Subject: Re: [robertlugg/easygui] easygui crashes on many OSX machines (#127)

I Think I found a solution @thomas-haslwanterhttps://github.com/thomas-haslwanter, @zadackahttps://github.com/zadacka and @spyoungtechhttps://github.com/spyoungtech!

After A LOT of search I discovered some strange problem that Mac OS has with TK. Basically, the build that comes embedded with MAC OS of TCL/TK has a bug since 10.6 that don't play nice with some characters.

Python website recommend that you replace the original TCL/TK on MAC OS with another one that don't have the bug. After that, Python will automatically forward all TCL/TK use (easygui included) to the custom version you installed instead of the native pre build version o MAC OS.

Install this file: ActiveTcl8.5.18.0.298892-macosx10.5-i386-x86_64-threaded.dmg and you should stop receiving this problems. The link is below:

http://downloads.activestate.com/ActiveTcl/releases/8.5.18.0/

Please take close attention to the license from activestate, they are NOT open source and it may influence your work.

- You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/robertlugg/easygui/issues/127#issuecomment-358297414, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ABdaRXIP407Edttwy1PBjoNXQkwo4GyHks5tLe9ygaJpZM4OElhF.

zadacka commented 6 years ago

Okay, thanks. Please do keep us posted.

It isn't a modification of the python installation so much as updating another library - which isn't ideal, but isn't totally uncommon. Tk is the requirement that easygui has, so there is unlikely an easy way to get around this (I'm open to suggestions!). We might be able to update minimum required version in the eaqygui dependencies so that it pulls that in at install time...

webpolis commented 5 years ago

I was having same trouble with EasyGui on Mac. @zadacka if Tk is a requirement, then why is there a statement on EasyGui's homepage stating:

EasyGUI runs on Python 2 and 3, and does not have any dependencies.

I must regret now from using EasyGui for certain features in my app, because embedding and setting up an additional package is not a viable option unfortunately.

spyoungtech commented 5 years ago

@webpolis I believe the README means it does not have any Python dependencies, which is true since tkinter is included in the standard lib.

Additionally, you can reasonably expect Tk to be available on just about any modern OS with a user interface. The problem with MacOS is that Apple packs a custom modified tcl/tk which is bugged.

Additionally, with modern versions of Python, a private copy of tcl/tk is packed in with Python on MacOS installers. So this may alleviate your concerns if you're using these versions of Python

As of Python 3.7.0, 3.6.8, and 2.7.16, all current Python installers for macOS downloadable from python.org supply their own private copies of Tcl/Tk 8.6.8. They do not look for or use any third-party or system copies of Tcl/Tk. This is an Aqua Cocoa Tk.

https://www.python.org/download/mac/tcltk/