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

Crash upon start up #56349

Closed
PhilipDrew mannequin opened this issue May 21, 2011 · 15 comments
Closed

Crash upon start up #56349

PhilipDrew mannequin opened this issue May 21, 2011 · 15 comments
Labels
topic-IDLE topic-installation type-crash A hard crash of the interpreter, possibly with a core dump

Comments

@PhilipDrew
Copy link
Mannequin

PhilipDrew mannequin commented May 21, 2011

BPO 12140
Nosy @amauryfa, @tjguk, @ezio-melotti

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 2011-05-24.11:32:43.515>
created_at = <Date 2011-05-21.22:19:54.972>
labels = ['invalid', 'expert-IDLE', 'expert-installation', 'type-crash']
title = 'Crash upon start up'
updated_at = <Date 2011-05-24.11:32:43.513>
user = 'https://bugs.python.org/PhilipDrew'

bugs.python.org fields:

activity = <Date 2011-05-24.11:32:43.513>
actor = 'amaury.forgeotdarc'
assignee = 'none'
closed = True
closed_date = <Date 2011-05-24.11:32:43.515>
closer = 'amaury.forgeotdarc'
components = ['IDLE', 'Installation']
creation = <Date 2011-05-21.22:19:54.972>
creator = 'Philip.Drew'
dependencies = []
files = []
hgrepos = []
issue_num = 12140
keywords = []
message_count = 15.0
messages = ['136481', '136482', '136530', '136531', '136532', '136610', '136622', '136668', '136674', '136679', '136685', '136732', '136736', '136739', '136740']
nosy_count = 4.0
nosy_names = ['amaury.forgeotdarc', 'tim.golden', 'ezio.melotti', 'Philip.Drew']
pr_nums = []
priority = 'normal'
resolution = 'not a bug'
stage = 'resolved'
status = 'closed'
superseder = None
type = 'crash'
url = 'https://bugs.python.org/issue12140'
versions = ['Python 2.7']

@PhilipDrew
Copy link
Mannequin Author

PhilipDrew mannequin commented May 21, 2011

Upon execution of python.exe a command line box appears for a fraction of a second, closes and is followed by nothing. On executing IDLE from the start menu, nothing happens. I have installed python to C:\Python27 using the python windows installer.
I am running win7 64 bit on a toshiba satellite 17X

@PhilipDrew PhilipDrew mannequin added topic-IDLE topic-installation type-crash A hard crash of the interpreter, possibly with a core dump labels May 21, 2011
@ezio-melotti
Copy link
Member

Can you try to open a Windows terminal (start->run->cmd or win+r on the keyboard), cd to Python27, execute python.exe and see if it gives any error message there?

@PhilipDrew
Copy link
Mannequin Author

PhilipDrew mannequin commented May 22, 2011

The error message is:
ImportError: No module named site.

@ezio-melotti
Copy link
Member

The 'site' module should be in Python27\Lib\site.py.
You could try to run "python.exe -v" to see if it says something useful in the output, or maybe try to reinstall Python and see if it works.

@PhilipDrew
Copy link
Mannequin Author

PhilipDrew mannequin commented May 22, 2011

The site module is in the right place
This is what I got running the -v flag: (I don't know what you're looking for)

Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.

C:\Users\PWTD>c:\Python27\python.exe -v
# installing zipimport hook
import zipimport # builtin
# installed zipimport hook
ImportError: No module named site
# 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
# clear sys.flags
# clear sys.float_info
# restore sys.stdin
# restore sys.stdout
# restore sys.stderr
# cleanup __main__
# cleanup[1] zipimport
# cleanup[1] signal
# cleanup[1] exceptions
# cleanup[1] _warnings
# cleanup sys
# cleanup __builtin__
# cleanup ints: 6 unfreed ints
# cleanup floats

C:\Users\PWTD>c:\Python27\python.exe
ImportError: No module named site

@PhilipDrew
Copy link
Mannequin Author

PhilipDrew mannequin commented May 23, 2011

Reinstalling makes no difference- have tried multiple times

@tjguk
Copy link
Member

tjguk commented May 23, 2011

What happens if you try "python -S" (capital S)? In principle this should bypass the need to load site.py. Even if that works we still have a problem to solve, but at least it might narrow things down.

@PhilipDrew
Copy link
Mannequin Author

PhilipDrew mannequin commented May 23, 2011

Gave it a go: the prompt appears, but none of the functions work thereafter

C:\Users\PWTD>c:\Python27\python -S
Python 2.7.1 (r271:86832, Nov 27 2010, 18:30:46) [MSC v.1500 32 bit (Intel)] on
win32
>>> print "hello"

LookupError: no codec search functions registered: can't find encoding

>>

@amauryfa
Copy link
Member

From a Windows command prompt:

  • what is the output of "chcp"?
  • maybe an environment variable issue? Try "set PY" to display all variables starting with PY.

@PhilipDrew
Copy link
Mannequin Author

PhilipDrew mannequin commented May 23, 2011

C:\Users\PWTD>set PY
PYTHONHOME=c:\program files (x86)\steam\steamapps\common\alien swarm\swarm\..\sdktools\python\2.5

C:\Users\PWTD>chcp
Active code page: 850

C:\Users\PWTD>

@amauryfa
Copy link
Member

hmm, I don't like this PYTHONHOME. Can you reset its value and run python again in the same terminal?

C:\Users\PWTD>set PYTHONHOME=
C:\Users\PWTD>c:\Python27\python

@PhilipDrew
Copy link
Mannequin Author

PhilipDrew mannequin commented May 24, 2011

Ok, python now works in command prompt, but IDLE still wont run.
Also, PYTHONHOME needs to be reset on every start up of command prompt.

@amauryfa
Copy link
Member

Yes, this is probably a system-wide setting. PYTHONHOME should not be set, especially if it points to another python installation.
You should consider removing it.

Is "alien swarm" a game? Why did it modify the system this way? Does the game still work when you remove the environment variable?

@PhilipDrew
Copy link
Mannequin Author

PhilipDrew mannequin commented May 24, 2011

Awesome. It's fixed- do you still want to know whether or not the game works.
In case it helps, I installed the game before python

@amauryfa
Copy link
Member

It's definitely a bad thing to set PYTHONHOME at the system level, when there are several pythons installed. Please report this to the game's developers.

@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 topic-installation type-crash A hard crash of the interpreter, possibly with a core dump
Projects
None yet
Development

No branches or pull requests

3 participants