No matter what I do, IDLE will not work...


C

CAMERON ALLEY

Lemme preface this post by saying the following - I've taken my
computer to the local IT office on RIT campus, asked a Computer
Science professor specializing in Python, and posted my question on
answers.yahoo.com (I don't know why I expected that to work...). I've
also googled my problem multiple times and have not come up with
anything newer than about 4 years ago.

Okay, so the problem. I tried to install Python 2.7 about two months
ago on both my laptop and iMac. Both are running up-to-date Mac OS X
10.6, with 64-bit processors and around 2.4GHz speed and 2G of RAM. My
laptop installed python 2.7 and ran it perfectly, first time. My
desktop... not so much.

How to recreate the issue on iMac - try to open IDLE, or in terminal,
type the following:
python
import turtle
turtle.up()

This is what's displayed in terminal:

COMPUTERNAME:~ USER$ python
Python 2.7.2 (v2.7.2:8527427914a2, Jun 11 2011, 15:22:34)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.CGColor with 1 components
Abort trap
COMPUTERNAME:~ USER$

It also pops up a Problem Report for Python
Python quit unexpectedly.
Click Reopen to open the application again. This report will be sent
to Apple automatically.
Problem Details and System Configuration

Process: Python [33535]
Path: /Library/Frameworks/Python.framework/Versions/2.7/
Resources/Python.app/Contents/MacOS/Python
Identifier: org.python.python
Version: 2.7.2 (2.7.2)
Code Type: X86-64 (Native)
Parent Process: bash [33532]

Date/Time: 2011-11-10 17:31:58.424 -0500
OS Version: Mac OS X 10.6.8 (10K549)
Report Version: 6

Interval Since Last Report: 1141508 sec
Crashes Since Last Report: 2
Per-App Interval Since Last Report: 2 sec
Per-App Crashes Since Last Report: 2
Anonymous UUID: C667A2E4-5530-4A3E-B6E3-
B38E970458E5

Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Crashed Thread: 0 Dispatch queue: com.apple.main-thread

Application Specific Information:
abort() called

Thread 0 Crashed: Dispatch queue: com.apple.main-thread
0 libSystem.B.dylib 0x00007fff89bd40b6 __kill + 10
1 libSystem.B.dylib 0x00007fff89c749f6 abort + 83
2 Tcl 0x000000010067f9ef Tcl_Panic + 0
3 Tcl 0x000000010067fa91 Tcl_Panic + 162
4 Tk 0x00000001010ac5a7 TkpGetColor +
383
5 Tk 0x00000001010b9a2a TkpMenuInit +
156
6 Tk 0x000000010103c36c TkMenuInit + 88
7 Tk 0x00000001010bc68b -
[TKApplication(TKMenus) _setupMenus] + 53
8 Tk 0x00000001010b6d27 -
[TKApplication(TKInit) _setup:] + 56
9 Tk 0x00000001010b7260 TkpInit + 545
10 Tk 0x000000010102da26 Initialize +
1678
11 _tkinter.so 0x00000001005fccfb Tcl_AppInit + 75
12 _tkinter.so 0x00000001005fa153 Tkinter_Create +
915
13 org.python.python 0x00000001000c102d
PyEval_EvalFrameEx + 22397
14 org.python.python 0x00000001000c2d29
PyEval_EvalCodeEx + 2137
15 org.python.python 0x000000010003da80 function_call +
176
16 org.python.python 0x000000010000c5e2 PyObject_Call +
98
17 org.python.python 0x000000010001ebcb
instancemethod_call + 363
18 org.python.python 0x000000010000c5e2 PyObject_Call +
98
19 org.python.python 0x00000001000be5f3
PyEval_EvalFrameEx + 11587
20 org.python.python 0x00000001000c2d29
PyEval_EvalCodeEx + 2137
21 org.python.python 0x000000010003da80 function_call +
176
22 org.python.python 0x000000010000c5e2 PyObject_Call +
98
23 org.python.python 0x000000010001ebcb
instancemethod_call + 363
24 org.python.python 0x000000010000c5e2 PyObject_Call +
98
25 org.python.python 0x00000001000ba5f7
PyEval_CallObjectWithKeywords + 87
26 org.python.python 0x0000000100021e5e PyInstance_New +
126
27 org.python.python 0x000000010000c5e2 PyObject_Call +
98
28 org.python.python 0x00000001000be5f3
PyEval_EvalFrameEx + 11587
29 org.python.python 0x00000001000c2d29
PyEval_EvalCodeEx + 2137
30 org.python.python 0x000000010003da80 function_call +
176
31 org.python.python 0x000000010000c5e2 PyObject_Call +
98
32 org.python.python 0x000000010001ebcb
instancemethod_call + 363
33 org.python.python 0x000000010000c5e2 PyObject_Call +
98
34 org.python.python 0x0000000100077a68 slot_tp_init +
88
35 org.python.python 0x0000000100074e65 type_call + 245
36 org.python.python 0x000000010000c5e2 PyObject_Call +
98
37 org.python.python 0x00000001000be5f3
PyEval_EvalFrameEx + 11587
38 org.python.python 0x00000001000c1ebe
PyEval_EvalFrameEx + 26126
39 org.python.python 0x00000001000c2d29
PyEval_EvalCodeEx + 2137
40 org.python.python 0x000000010003da80 function_call +
176
41 org.python.python 0x000000010000c5e2 PyObject_Call +
98
42 org.python.python 0x000000010001ebcb
instancemethod_call + 363
43 org.python.python 0x000000010000c5e2 PyObject_Call +
98
44 org.python.python 0x0000000100077a68 slot_tp_init +
88
45 org.python.python 0x0000000100074e65 type_call + 245
46 org.python.python 0x000000010000c5e2 PyObject_Call +
98
47 org.python.python 0x00000001000be5f3
PyEval_EvalFrameEx + 11587
48 org.python.python 0x00000001000c1ebe
PyEval_EvalFrameEx + 26126
49 org.python.python 0x00000001000c1ebe
PyEval_EvalFrameEx + 26126
50 org.python.python 0x00000001000c2d29
PyEval_EvalCodeEx + 2137
51 org.python.python 0x00000001000c2e46 PyEval_EvalCode
+ 54
52 org.python.python 0x00000001000e769c
PyRun_InteractiveOneFlags + 380
53 org.python.python 0x00000001000e78fe
PyRun_InteractiveLoopFlags + 78
54 org.python.python 0x00000001000e80e1
PyRun_AnyFileExFlags + 161
55 org.python.python 0x00000001000fe77c Py_Main + 2940
56 org.python.python 0x0000000100000f14 0x100000000 +
3860

Thread 1: Dispatch queue: com.apple.libdispatch-manager
0 libSystem.B.dylib 0x00007fff89b9ec0a kevent + 10
1 libSystem.B.dylib 0x00007fff89ba0add
_dispatch_mgr_invoke + 154
2 libSystem.B.dylib 0x00007fff89ba07b4
_dispatch_queue_invoke + 185
3 libSystem.B.dylib 0x00007fff89ba02de
_dispatch_worker_thread2 + 252
4 libSystem.B.dylib 0x00007fff89b9fc08
_pthread_wqthread + 353
5 libSystem.B.dylib 0x00007fff89b9faa5 start_wqthread +
13

Thread 2:
0 libSystem.B.dylib 0x00007fff89b9fa2a
__workq_kernreturn + 10
1 libSystem.B.dylib 0x00007fff89b9fe3c
_pthread_wqthread + 917
2 libSystem.B.dylib 0x00007fff89b9faa5 start_wqthread +
13

Thread 0 crashed with X86 Thread State (64-bit):
rax: 0x0000000000000000 rbx: 0x00007fff7116b2f8 rcx:
0x00007fff5fbfc0e8 rdx: 0x0000000000000000
rdi: 0x00000000000082ff rsi: 0x0000000000000006 rbp:
0x00007fff5fbfc100 rsp: 0x00007fff5fbfc0e8
r8: 0x00007fff7116ea60 r9: 0x0000000000000000 r10:
0x00007fff89bd00fa r11: 0x0000000000000206
r12: 0x00000001006ecb20 r13: 0x0000000000000001 r14:
0x00000001010e1f77 r15: 0x0000000000000000
rip: 0x00007fff89bd40b6 rfl: 0x0000000000000206 cr2:
0x00000001135b54f3
................
................
................
Model: iMac7,1, BootROM IM71.007A.B03, 2 processors, Intel Core 2 Duo,
2.4 GHz, 4 GB, SMC 1.20f4
Graphics: ATI Radeon HD 2600 Pro, ATI,RadeonHD2600, PCIe, 256 MB
Memory Module: global_name
AirPort: spairport_wireless_card_type_airport_extreme (0x14E4, 0x88),
Broadcom BCM43xx 1.0 (5.10.131.42.4)
Bluetooth: Version 2.4.5f3, 2 service, 19 devices, 1 incoming serial
ports
Network Service: Built-in Ethernet, Ethernet, en0
Network Service: AirPort, AirPort, en1
Serial ATA Device: WDC WD3200AAJS-40RYA0, 298.09 GB
Parallel ATA Device: OPTIARC DVD RW AD-5630A, 406.7 MB
USB Device: Built-in iSight, 0x05ac (Apple Inc.), 0x8502,
0xfd400000 / 2
USB Device: Bluetooth USB Host Controller, 0x05ac (Apple Inc.),
0x8206, 0x1a100000 / 2
USB Device: Razer Naga, 0x1532, 0x0015, 0x1d100000 / 2
USB Device: IR Receiver, 0x05ac (Apple Inc.), 0x8242, 0x5d100000 / 2




I have tried copying every framework possible from the laptop to the
iMac, done several reinstalls, and pretty much everything else I and
the IT people on campus could think of to no avail. I'm pretty close
to paying 20-30 bucks for a call to Apple and ask for help, because
I'm tired of programming on a 13-inch screen while my 20-inch desktop
is sitting right next to me just playing pandora...

P.S. To those who might say "just use your imac as another monitor!" I
can't. I've already asked Apple about that - the iMac is too old.

HELP!!!
 
Ad

Advertisements

J

John Gordon

In said:
Okay, so the problem. I tried to install Python 2.7 about two months
ago on both my laptop and iMac. Both are running up-to-date Mac OS X
10.6, with 64-bit processors and around 2.4GHz speed and 2G of RAM. My
laptop installed python 2.7 and ran it perfectly, first time. My
desktop... not so much.

IDLE is a separate program from Python itself, right? It's a GUI, or an
IDE, or a shell or something.

(Your session output doesn't seem to involve IDLE at all, so I am
wondering why you mentioned it.)

By typing "python" on your desktop, are you running plain Python, or
are you running IDLE?

Did you install Python and IDLE on the desktop machine separately?
Did both installations succeed?
 
C

CAMERON ALLEY

IDLE is a separate program from Python itself, right?  It's a GUI, or an
IDE, or a shell or something.

(Your session output doesn't seem to involve IDLE at all, so I am
wondering why you mentioned it.)

By typing "python" on your desktop, are you running plain Python, or
are you running IDLE?

Did you install Python and IDLE on the desktop machine separately?
Did both installations succeed?

Thanks for the prompt response - yes, IDLE is a seperate program from
python, however included in the Python 2.7.2 folder when downloaded
from python.org. It's an IDE. I mentioned it, because when I try to
open it, I also get an error report, so I figured it wouldn't be
coincidence.

I'm not typing "python" on my desktop, I'm typing it in terminal with
no change of default directory. It runs plain python THROUGH terminal,
and when I import turtle, and call turtle.up() it should in theory
display an image of whatever I asked turtle to draw (in this case
nothing, but the window should still pop up.)

I installed two things on the desktop - python2.7.2 from python.org
and the respective ActiveTK. Both succeeded.
 
T

Terry Reedy

Okay, so the problem. I tried to install Python 2.7 about two months
ago on both my laptop and iMac. Both are running up-to-date Mac OS X
10.6, with 64-bit processors and around 2.4GHz speed and 2G of RAM. My
laptop installed python 2.7 and ran it perfectly, first time. My
desktop... not so much.

You issue has nothing to do with IDLE and perhaps all to do with the
buggy tcl/tk that comes with OSX 10.6. The Python module tkinter is the
tk interface for Python (hence the name). The turtle module and IDLE
both use tkinter. Searching all tracker issues (open and closed) for
'max tcl' turns up (among several others)
http://bugs.python.org/issue10907
http://bugs.python.org/issue10969
http://bugs.python.org/issue12269
The latter 2, especially, might tell you what to do.
 
N

Ned Deily

Lemme preface this post by saying the following - I've taken my
computer to the local IT office on RIT campus, asked a Computer
Science professor specializing in Python, and posted my question on
answers.yahoo.com (I don't know why I expected that to work...). I've
also googled my problem multiple times and have not come up with
anything newer than about 4 years ago.

Okay, so the problem. I tried to install Python 2.7 about two months
ago on both my laptop and iMac. Both are running up-to-date Mac OS X
10.6, with 64-bit processors and around 2.4GHz speed and 2G of RAM. My
laptop installed python 2.7 and ran it perfectly, first time. My
desktop... not so much.

How to recreate the issue on iMac - try to open IDLE, or in terminal,
type the following:
python
import turtle
turtle.up()

This is what's displayed in terminal:

COMPUTERNAME:~ USER$ python
Python 2.7.2 (v2.7.2:8527427914a2, Jun 11 2011, 15:22:34)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.CGColor with 1 components
Abort trap
COMPUTERNAME:~ USER$

That's an odd one; I've not seen a crash like that before. From the
crash dump, it is clear that the crash is happening inside of Tk, not
Python, and, judging from the symbol names, it has something to do with
menu initialization and colors.

Try running the same Turtle test using the Apple-supplied Python 2.6

/usr/bin/python2.6

The Apple-supplied Tcl/Tk that it uses is known to have a number of
serious problems and should not be used for serious work but, for me, it
will bring up the turtle window in Tk without crashing. If it crashes
the same way that 2.7.2 does, then that would be pretty solid
corroboration that the problem is not in Python and more likely an issue
with Tk.

My first question would be do you have some third-party OS X app or
extension installed that alters or colors menus? I know there used to
be some popular ones out there in the past. If not, try opening System
Preferences, select Displays, select Color, and check which display
profile is selected. Perhaps try selecting another. And are you using
a specific language in System Preferences -> Languages & Text ->
Language?

If that doesn't help, try running the following commands in a terminal
window:

source /Library/Frameworks/Tk.framework/Versions/8.5/tkConfig.sh
echo $TK_VERSION $TK_PATCH_LEVEL

You should see something like:

8.5 .11

If not, double check that you really are using the latest ActiveState
Tcl/Tk 8.5 installer from here:

http://www.activestate.com/activetcl/downloads

Then try the failing turtle commads again and in the crash report,
verify that /Library/Frameworks/Tk.framework/Versions/8.5/ appear as
framework paths and *not*
/System/Library/Frameworks/Tk.framework/Versions/8.5/.

Try the following command which may not work if you don't have Xcode
tools installed:

otool -L $(python2.7 -c 'import _tkinter; print(_tkinter.__file__)')

The paths reported again should start with
/Library/Frameworks/Tk.framework and not
/System/Library/Frameworks/Tk.framework.

If none of that works, you could try installing the other python.org
2.7.2 installer, the 32-bit-only one, which is linked to the older
Tcl/Tk 8.4, which uses Carbon interfaces rather than Cocoa, and see what
happens with it.

In any case, please report back what you find and, if necessary, open an
issue on the Python bug tracker:
http://bugs.python.org/

Thanks!
 
C

CAMERON ALLEY

That's an odd one; I've not seen a crash like that before.  From the
crash dump, it is clear that the crash is happening inside of Tk, not
Python, and, judging from the symbol names, it has something to do with
menu initialization and colors.

Try running the same Turtle test using the Apple-supplied Python 2.6

  /usr/bin/python2.6

The Apple-supplied Tcl/Tk that it uses is known to have a number of
serious problems and should not be used for serious work but, for me, it
will bring up the turtle window in Tk without crashing.  If it crashes
the same way that 2.7.2 does, then that would be pretty solid
corroboration that the problem is not in Python and more likely an issue
with Tk.

My first question would be do you have some third-party OS X app or
extension installed that alters or colors menus?  I know there used to
be some popular ones out there in the past.  If not, try opening System
Preferences, select Displays, select Color, and check which display
profile is selected.  Perhaps try selecting another.  And are you using
a specific language in System Preferences -> Languages & Text ->
Language?

If that doesn't help, try running the following commands in a terminal
window:

  source /Library/Frameworks/Tk.framework/Versions/8.5/tkConfig.sh
  echo $TK_VERSION $TK_PATCH_LEVEL

You should see something like:

  8.5 .11

If not, double check that you really are using the latest ActiveState
Tcl/Tk 8.5 installer from here:

 http://www.activestate.com/activetcl/downloads

Then try the failing turtle commads again and in the crash report,
verify that  /Library/Frameworks/Tk.framework/Versions/8.5/ appear as
framework paths and *not*
/System/Library/Frameworks/Tk.framework/Versions/8.5/.

Try the following command which may not work if you don't have Xcode
tools installed:

  otool -L $(python2.7 -c 'import _tkinter; print(_tkinter.__file__)')

The paths reported again should start with
/Library/Frameworks/Tk.framework and not
/System/Library/Frameworks/Tk.framework.

If none of that works, you could try installing the other python.org
2.7.2 installer, the 32-bit-only one, which is linked to the older
Tcl/Tk 8.4, which uses Carbon interfaces rather than Cocoa, and see what
happens with it.

In any case, please report back what you find and, if necessary, open an
issue on the Python bug tracker:
 http://bugs.python.org/

Thanks!
Thanks so much for your incredibly in-depth response Ned!

I've tried everything you've suggested and here's what I've found:

The error occurs with the old python as well, but this MIGHT be
because at some point during my many attempts at fixing this issue I
could have deleted an old tk framework.

It's funny you mention the theming - before snow leapord, I had
leapord installed and used magnifique to theme my computer. I then
upgraded to snow leapord and (like a novice) tried to use magnifique
again only to find it crashed my system because it's not compatible
with snow leapord. I did a reinstall of the OS though, and everything
was fine. (this was about 2 years ago). I also recently installed
Crystal Black on here, however I've been having this issue since
before that. Other than that, no specific theming or color changing
schemes come to mind... Oh actually there is something called Nocturne
I used to use... Not sure if any of these could be affecting this.

There's only one color profile, and no bizarre language being used.

When I typed that in terminal, I saw 8.5.11 - this was the recommended
activestate by python.org. Should I get 8.5.11?

I tried the failing turtle commands, and in the crash report /Library/
Frameworks/Tk.framework/Versions/8.5/ only appears once (when doing a
cmd+f search) and does not have /System/ in front of it.

I'm going to try installing the 32 bit 2.7.2 installer next, and I'll
be back to let you know how it goes.

Thanks a lot!

Cameron
 
Ad

Advertisements

C

CAMERON ALLEY

IT WORKS!!!! I didn't change my activestate, but I downloaded python
3.2.2 with the 32 bit installer and it works! Perfectally!!

Sir you're my savior, thank you so much.

I don't know how you did it but you just made my day :)

Thanks again
 
Ad

Advertisements

N

Ned Deily

IT WORKS!!!! I didn't change my activestate, but I downloaded python
3.2.2 with the 32 bit installer and it works! Perfectally!!

Sir you're my savior, thank you so much.

I don't know how you did it but you just made my day :)

The 32-bit-installer links to the older Carbon-based Tcl/Tk 8.4 which is
very different under the covers from the Tcl/Tk 8.5 used by the
Apple-supplied Pythons and the python.org 64-bit installer. So there's
*something* on your system that interferes with the Cocoa Tcl/Tk 8.5.
If you want to pursue it, you might ask on the OS X Tcl mailing list.
Good luck!

http://dir.gmane.org/gmane.comp.lang.tcl.mac
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top