easygui icon indicating copy to clipboard operation
easygui copied to clipboard

easygui bring on mac os crash

Open XFrankly opened this issue 6 years ago • 5 comments

you can recur on the system: mac 10.14.6 the step is this: 1, open IDLE 2, import easygui 3, easygui.msgbox('This is a basic message box.', 'Title Goes Here') 4, the system cancel and log off,when you login again, the python3.6 IDLE was crash. there is not any log.

XFrankly avatar Nov 24 '19 01:11 XFrankly

I encountered the same problem today: I use MacOS 10.14.6, python 3.8.1 and easygui 0.98.1. When I run the following script

import easygui  
easygui.msgbox("test") 

The user account logs off. Even worse, if I run the script from a full screen terminal, the screen turns gray/black and no interaction with the operating system is possible anymore. Only a hard restart (holding down the power button for several seconds) allows leaving this state.

import easygui  
media = easygui.fileopenbox(title="Choose file to open")

leads to a crash of python - but no log off are freeze.

I installed esaygui via conda as follows:

 conda install -c conda-forge easygui 

PrometheusPi avatar Jun 10 '20 20:06 PrometheusPi

I went through the easygui code and try to reproduce the functionality of msgbox() based on the underlying methods. The issue is not caused by easygui itself but by the used tkinter. The simple script:

import tkinter 
tkinter.Tk()

which is used in GUItk object leads to a log off.

PrometheusPi avatar Jun 10 '20 20:06 PrometheusPi

Most likely related to these issues: http://staging.python.org/download/mac/tcltk/ and seems to be a common issue with specific python an tk versions: https://github.com/ContinuumIO/anaconda-issues/issues/11165 The combination proposed by @TheodoreEhrenborg in this comment seems to work.

PrometheusPi avatar Jun 10 '20 21:06 PrometheusPi

FILE_PATH = easygui.fileopenbox(msg=f'Please locate the {file_type_name} file',
                                     default=f"*.{FILE_TYPE[file_type_name]}",
                                     filetypes=[f"*.{FILE_TYPE[file_type_name]}"],
                                     multiple=False)

I am also facing the same problem. I was running this piece of code in windows it was working fine. but now I am working on mac it crashing.

zeelsheladiya avatar Dec 13 '22 17:12 zeelsheladiya