[Idle-dev] can't run idle. ImportError: cannot import name print_exc

Jon Schull jschull at softlock.com
Sun Dec 19 00:52:57 CET 2004


Greetings.  I've lost the ability to run idle.

Perhaps the information below will help?

208-186-56-189:~ jis$ idle
-bash: /sw/lib/python2.3/idlelib/idle.py: Permission denied
208-186-56-189:~ jis$ sudo idle
Password:
Traceback (most recent call last):
   File "/sw/bin/idle", line 3, in ?
     from idlelib.PyShell import main
   File 
"/sw/src/root-python23-2.3.4-2/sw/lib/python2.3/idlelib/PyShell.py", 
line 11, in ?
   File "/sw/lib/python2.3/threading.py", line 13, in ?
     from traceback import print_exc as _print_exc
ImportError: cannot import name print_exc

208-186-56-189:~ jis$ find idle
find: idle: No such file or directory

208-186-56-189:~ jis$ /sw/bin/python -v
# installing zipimport hook
import zipimport # builtin
# installed zipimport hook
# /sw/lib/python2.3/site.pyc matches /sw/lib/python2.3/site.py
import site # precompiled from /sw/lib/python2.3/site.pyc
# /sw/lib/python2.3/os.pyc matches /sw/lib/python2.3/os.py
import os # precompiled from /sw/lib/python2.3/os.pyc
import posix # builtin
# /sw/lib/python2.3/posixpath.pyc matches /sw/lib/python2.3/posixpath.py
import posixpath # precompiled from /sw/lib/python2.3/posixpath.pyc
# /sw/lib/python2.3/stat.pyc matches /sw/lib/python2.3/stat.py
import stat # precompiled from /sw/lib/python2.3/stat.pyc
# /sw/lib/python2.3/UserDict.pyc matches /sw/lib/python2.3/UserDict.py
import UserDict # precompiled from /sw/lib/python2.3/UserDict.pyc
# /sw/lib/python2.3/copy_reg.pyc matches /sw/lib/python2.3/copy_reg.py
import copy_reg # precompiled from /sw/lib/python2.3/copy_reg.pyc
# /sw/lib/python2.3/types.pyc matches /sw/lib/python2.3/types.py
import types # precompiled from /sw/lib/python2.3/types.pyc
# /sw/lib/python2.3/warnings.pyc matches /sw/lib/python2.3/warnings.py
import warnings # precompiled from /sw/lib/python2.3/warnings.pyc
# /sw/lib/python2.3/linecache.pyc matches /sw/lib/python2.3/linecache.py
import linecache # precompiled from /sw/lib/python2.3/linecache.pyc
import encodings # directory /sw/lib/python2.3/encodings
# /sw/lib/python2.3/encodings/__init__.pyc matches 
/sw/lib/python2.3/encodings/__init__.py
import encodings # precompiled from 
/sw/lib/python2.3/encodings/__init__.pyc
# /sw/lib/python2.3/codecs.pyc matches /sw/lib/python2.3/codecs.py
import codecs # precompiled from /sw/lib/python2.3/codecs.pyc
import _codecs # builtin
# /sw/lib/python2.3/encodings/aliases.pyc matches 
/sw/lib/python2.3/encodings/aliases.py
import encodings.aliases # precompiled from 
/sw/lib/python2.3/encodings/aliases.pyc
# /sw/lib/python2.3/encodings/ascii.pyc matches 
/sw/lib/python2.3/encodings/ascii.py
import encodings.ascii # precompiled from 
/sw/lib/python2.3/encodings/ascii.pyc
Python 2.3.4 (#1, Nov  7 2004, 14:21:14)
[GCC 3.3 20030304 (Apple Computer, Inc. build 1495)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
import readline # dynamically loaded from 
/sw/lib/python2.3/lib-dynload/readline.so
 >>>

^c

# clear __builtin__._
# clear sys.path
# clear sys.argv
# clear sys.ps1
# clear sys.ps2
# clear sys.exitfunc
# clear sys.exc_type
# clear sys.exc_value
# clear sys.exc_traceback
# clear sys.last_type
# clear sys.last_value
# clear sys.last_traceback
# clear sys.path_hooks
# clear sys.path_importer_cache
# clear sys.meta_path
# restore sys.stdin
# restore sys.stdout
# restore sys.stderr
# cleanup __main__
# cleanup[1] site
# cleanup[1] encodings
# cleanup[1] _codecs
# cleanup[1] zipimport
# cleanup[1] warnings
# cleanup[1] encodings.ascii
# cleanup[1] codecs
# cleanup[1] readline
# cleanup[1] types
# cleanup[1] signal
# cleanup[1] linecache
# cleanup[1] posix
# cleanup[1] encodings.aliases
# cleanup[1] exceptions
# cleanup[2] copy_reg
# cleanup[2] posixpath
# cleanup[2] os.path
# cleanup[2] stat
# cleanup[2] UserDict
# cleanup[2] os
# cleanup sys
# cleanup __builtin__
# cleanup ints: 4 unfreed ints in 1 out of 2 blocks
# cleanup floats

208-186-56-189:~ jis$ idle
-bash: /sw/lib/python2.3/idlelib/idle.py: Permission denied
208-186-56-189:~ jis$ /sw/bin/python /sw/lib/python2.3/idlelib/idle.py
Traceback (most recent call last):
   File "<string>", line 1, in ?
   File "/sw/lib/python2.3/idlelib/run.py", line 7, in ?
     import threading
   File "/sw/lib/python2.3/threading.py", line 13, in ?
     from traceback import print_exc as _print_exc
ImportError: cannot import name print_exc

^CTraceback (most recent call last):
   File "/sw/lib/python2.3/idlelib/idle.py", line 21, in ?
     PyShell.main()
   File "/sw/lib/python2.3/idlelib/PyShell.py", line 1287, in main
     flist.pyshell = PyShell(flist)
   File "/sw/lib/python2.3/idlelib/PyShell.py", line 769, in __init__
     self.interp.start_subprocess()
   File "/sw/lib/python2.3/idlelib/PyShell.py", line 362, in 
start_subprocess
     self.rpcclt.accept()
   File "/sw/lib/python2.3/idlelib/rpc.py", line 526, in accept
     working_sock, address = self.listening_sock.accept()
   File "/sw/lib/python2.3/socket.py", line 167, in accept
     sock, addr = self._sock.accept()
KeyboardInterrupt


208-186-56-189:~ jis$ sudo /sw/bin/python 
/sw/lib/python2.3/idlelib/idle.py
Password:
Traceback (most recent call last):
   File "<string>", line 1, in ?
   File "/sw/lib/python2.3/idlelib/run.py", line 7, in ?
     import threading
   File "/sw/lib/python2.3/threading.py", line 13, in ?
     from traceback import print_exc as _print_exc
ImportError: cannot import name print_exc



=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Jon Schull, Ph.D.
Associate Professor
Information Technology
Rochester Institute of Technology
102 Lomb Memorial Drive
Rochester, New York 14623
schull at digitalgoods.com 585-738-6696
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/enriched
Size: 5785 bytes
Desc: not available
Url : http://mail.python.org/pipermail/idle-dev/attachments/20041218/11a9acf6/attachment.bin


More information about the IDLE-dev mailing list