Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Idle crashes when opening file #63683

Closed
Schiefna mannequin opened this issue Nov 3, 2013 · 7 comments
Closed

Idle crashes when opening file #63683

Schiefna mannequin opened this issue Nov 3, 2013 · 7 comments
Labels
topic-IDLE type-crash A hard crash of the interpreter, possibly with a core dump

Comments

@Schiefna
Copy link
Mannequin

Schiefna mannequin commented Nov 3, 2013

BPO 19484
Nosy @ned-deily

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = None
closed_at = <Date 2013-11-03.18:50:51.728>
created_at = <Date 2013-11-03.14:52:53.964>
labels = ['expert-IDLE', 'type-crash']
title = 'Idle crashes when opening file'
updated_at = <Date 2013-11-04.03:23:18.616>
user = 'https://bugs.python.org/Schiefna'

bugs.python.org fields:

activity = <Date 2013-11-04.03:23:18.616>
actor = 'Jerry.Barrington'
assignee = 'none'
closed = True
closed_date = <Date 2013-11-03.18:50:51.728>
closer = 'ned.deily'
components = ['IDLE']
creation = <Date 2013-11-03.14:52:53.964>
creator = 'Schiefna'
dependencies = []
files = []
hgrepos = []
issue_num = 19484
keywords = []
message_count = 7.0
messages = ['202027', '202051', '202055', '202056', '202057', '202062', '202078']
nosy_count = 3.0
nosy_names = ['ned.deily', 'Schiefna', 'Jerry.Barrington']
pr_nums = []
priority = 'normal'
resolution = 'out of date'
stage = 'resolved'
status = 'closed'
superseder = None
type = 'crash'
url = 'https://bugs.python.org/issue19484'
versions = ['Python 2.7']

@Schiefna
Copy link
Mannequin Author

Schiefna mannequin commented Nov 3, 2013

Whenever I try opening a .py file, Idle crashes.
Mac OS X, 10.6.8

@Schiefna Schiefna mannequin added topic-IDLE type-crash A hard crash of the interpreter, possibly with a core dump labels Nov 3, 2013
@ned-deily
Copy link
Member

OS X 10.6 Snow Leopard shipped with a new version of Tk 8.5 that is mostly unusable with IDLE and other Tkinter applications. If you are using the Apple-supplied system Python on OS X, you should install a new version of Python that allows use of a different version of Tk. If you are using a python.org installer, install a third-party version of Tk or the latest installers which include their own built-in copies of Tk. See http://www.python.org/download/mac/tcltk/ for detailed information. If this does not solve your problem, please reopen this issue and supply more information.

@JerryBarrington
Copy link
Mannequin

JerryBarrington mannequin commented Nov 3, 2013

I installed python-2.7.6rc1-macosx10.6_rev1.dmg, which says it has it's own Tk builtin, on OSX 10.6.8. Idle crashes when I double-click a *.py file. If I try to open a file from within Idle, a blank window opens that I can't close.

@ned-deily
Copy link
Member

Double-clicking on a .py may not be opening the file with the right version of IDLE. OS X maintains the associations between file types, based on file characteristics like the extension (e.g. ".py"), and applications. To select exactly which application to open a file, rather than double-clicking on it, click on it once to select it then use control-click to being up a context menu and use "Open With" to select the 2.7.6 version of IDLE. You can also use the Finder's Get Info command to change application associations for a particular file or for all files of a particular type. The details of all of this vary slightly depending on OS X release.

@ned-deily
Copy link
Member

My apologies! What I just wrote is accurate but not the problem you are seeing. I forgot that there is a problem with IDLE's Open command that was discovered after the release of 2.7.6rc1. See bpo-19426 It will be fixed in the final release of 2.7.6 which should be available sometime this week.

@ned-deily
Copy link
Member

P.S. If you feel comfortable with using the command line, you *could* install the fix for bpo-19426 yourself into 2.7.6rc1 if you can't wait for the final release. For the OS X python.org installers, something like this should work from a user login with administrator privileges (sudo may ask for your password):

cd ~/Downloads
curl -O http://hg.python.org/cpython/raw-file/7fde94ad5df4/Lib/idlelib/IOBinding.py
cd /Library/Frameworks/Python.framework/Versions/2.7
cd ./lib/python2.7/idlelib
diff ~/Downloads/IOBinding.py ./IOBinding.py
sudo cp -p ./IOBinding.py ./IOBinding.py.ORIGINAL
sudo cp ~/Downloads/IOBinding.py ./IOBinding.py
sudo rm -f ./IOBinding.pyc ./IOBinding.pyo
sudo chmod 664 ./IOBinding.py

The output from the diff command should look like this:

$ diff ~/Downloads/IOBinding.py IOBinding.py
128c128
<     lst = str.split("\n", 2)[:2]

str = str.split("\\n", 2)[:2]

@JerryBarrington
Copy link
Mannequin

JerryBarrington mannequin commented Nov 4, 2013

Thank you, that fix worked perfectly.

Only one weird thing. I have IDLE's preferences set to "At Startup: Open Shell Window". If I double click a *.py file while IDLE isn't running, the shell pops up, then the py file pops up, then the shell goes away. Not a problem, but kind of weird behavior.

@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic-IDLE type-crash A hard crash of the interpreter, possibly with a core dump
Projects
None yet
Development

No branches or pull requests

1 participant