0

Can anybody help with this? Whenever I try to launch tkinter, i get this report:

Process: Python [1106] Path:
/Library/Frameworks/Python.framework/Versions/3.5/Resources/Python.app/Contents/MacOS/Python Identifier: org.python.python Version: 3.5.1 (3.5.1) Code Type: X86-64 (Native) Parent Process:
Python [1036] Responsible: Python [1036] User ID:
501

Date/Time: 2016-04-28 00:14:59.804 -0500 OS Version:
Mac OS X 10.10.5 (14F1713) Report Version: 11 Anonymous UUID:
8A5EA9E5-B94F-6C3F-2F7E-EC33C5FA8E26

Time Awake Since Boot: 4900 seconds

Crashed Thread: 0 Dispatch queue: com.apple.main-thread

Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Codes:
KERN_INVALID_ADDRESS at 0x00007fff5afffff8

VM Regions Near 0x7fff5afffff8: mapped file 000000010a37f000-000000010a409000 [ 552K] rw-/rwx SM=COW /System/Library/Fonts/Monaco.dfont --> __UNIXSTACK 00007fff5b000000-00007fff5c000000 [ 16.0M] rw-/rwx SM=COW /Library/Frameworks/Python.framework/Versions/3.5/Resources/Python.app/Contents/MacOS/Python

Terry Jan Reedy
  • 18,414
  • 3
  • 40
  • 52
ZigZag
  • 625
  • 7
  • 7
  • Have you tried reinstalling python for your version of mac osx?i know this problem was on osx 10.9 as detailed [Here](http://stackoverflow.com/questions/19723073/strange-problems-with-python-after-upgrading-to-os-x-mavericks) – Byren Higgin Apr 28 '16 at 05:23
  • Had to debug my code. Also had to update the tlc version. – ZigZag Apr 29 '16 at 16:31

2 Answers2

1

If you are using Homebrew, you can reinstall a corrupted Python environment like this:

brew uninstall --ignore-dependencies --force python python@2
unset PYTHONPATH
brew install python python@2

I had another "quit unexpectedly" issue and this resolved it for me.

Cory
  • 748
  • 7
  • 18
0

Python quit unexpectedly when running the code below on my Mac (OS X Yosemite):

root.config(menu_Bar = file_Menu)


# Tkinter GUI Menu

from tkinter import *

### Functions ###

# Do Nothing
def do_Nothing():
    print('I just did... nothing')



### Create tkinter window ###

# Create Window
root = Tk() 



#### Creating the Menu(s) ###

# Create the Menu Bar
menu_Bar = Menu(master = root)

# Create File Menu
file_Menu = Menu(master = menu_Bar)



### Displaying the Menu(s) ###

# Display Menu Bar
root.config(menu = menu_Bar)

# Display File Menu
menu_Bar.add_cascade(label = 'File', menu = file_Menu)




### File Menu Properties ####

# New
file_Menu.add_command(label = 'New', command = do_Nothing)

# Open
file_Menu.add_command(label = 'Open', command = do_Nothing)

# Exit
file_Menu.add_command(label = 'Exit', command = root.quit) 




### Display tkinter window ###
root.mainloop()


# Display Menu Bar
root.config(menu = menu_Bar)

The issue that made Python quit unexpectedly was that instead of

# Display Menu Bar
root.config(menu = menu_Bar)

I had originally wrote something like:

# Display Menu Bar
root.config(myMenu = menu_Bar)

In addition to that, I had to update the Tlc from version Apple 8.5.9 to ActiveTcl 8.5.18.0. The website for this is here: https://www.python.org/download/mac/tcltk/#activetcl-8-5-18-0

ZigZag
  • 625
  • 7
  • 7