Skip to content

IDLE won't start in custom directory. #48131

Closed

Description

@kimsey0
mannequin
BPO 3881
Nosy @loewis, @devdanzin, @kimsey0
Files
  • symlink.diff
  • 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 2009-01-24.16:27:07.586>
    created_at = <Date 2008-09-16.13:47:38.042>
    labels = ['expert-IDLE', 'library', 'OS-windows', 'type-crash']
    title = "IDLE won't start in custom directory."
    updated_at = <Date 2009-11-16.08:59:08.434>
    user = 'https://github.com/kimsey0'

    bugs.python.org fields:

    activity = <Date 2009-11-16.08:59:08.434>
    actor = 'ggenellina'
    assignee = 'none'
    closed = True
    closed_date = <Date 2009-01-24.16:27:07.586>
    closer = 'loewis'
    components = ['IDLE', 'Library (Lib)', 'Windows']
    creation = <Date 2008-09-16.13:47:38.042>
    creator = 'kimsey0'
    dependencies = []
    files = ['12832']
    hgrepos = []
    issue_num = 3881
    keywords = ['patch']
    message_count = 28.0
    messages = ['73301', '73315', '73316', '80027', '80032', '80033', '80034', '80035', '80036', '80038', '80039', '80041', '80043', '80082', '80102', '80110', '80114', '80129', '80131', '80146', '80189', '80259', '80278', '80369', '80376', '80420', '80459', '95331']
    nosy_count = 6.0
    nosy_names = ['loewis', 'ggenellina', 'ajaksu2', 'kimsey0', 'zlm', 'srid']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = None
    status = 'closed'
    superseder = None
    type = 'crash'
    url = 'https://bugs.python.org/issue3881'
    versions = ['Python 2.6', 'Python 3.0', 'Python 3.1', 'Python 2.7']

    Activity

    1. kimsey0 commented on Sep 16, 2008

      kimsey0mannequin
      MannequinAuthor

      Hello.

      I run Python 2.5.2 (r252:60911, Feb 21 2008, 13:11:45) on Windows Vista
      Home Premium.
      IDLE won't start if not installed in the default directory.
      When insalled in a custom directory, running idle.py
      (\Lib\idlelib\idle.py) produces this error:

      "Traceback (most recent call last):
      File "C:\Programmer\Python\lib\idlelib\idle.py", line 21, in <module>
      idlelib.PyShell.main()
      File "C:\Programmer\Python\lib\idlelib\PyShell.py", line 1390, in main
      root= Tk(className="Idle")
      File "C:\Programmer\Python\lib\idlelib\Tkinter.py", line 1636, in
      __init__ self.tk = _tkinter.create(screenName, baseName, className,
      interactive, wantobjects, useTk, sync, use)
      _tkinter.TclError: Can't find a usable init.tcl in the following
      directories: {C:\Programmer\Python\tcl\tcl8.4}
      {C:\Programmer\Python\tcl\tcl8.4} C:/Programmer/Python/tcl/tcl8.4
      C:/Programmer/Python/lib/tcl8.4 C:/Programmer/Python/lib/tcl8.4
      C:/lib/tcl8.4 C:/library C:/tcl8.4/library

      This probable means that Tcl wasn't installed properly."

    2. added
      stdlib
      type-crash
      on Sep 16, 2008
    3. loewis commented on Sep 16, 2008

      loewismannequin
      Mannequin

      Do you have TCL_DIR or TK_DIR environment variables set?

    4. kimsey0 commented on Sep 16, 2008

      kimsey0mannequin
      MannequinAuthor

      No, nothing.
      It's just a standart clean installation.

    5. zlm commented on Jan 17, 2009

      zlmmannequin
      Mannequin

      Hi. I have the same problem, but i'm running Pyhton 2.6.1. I'm using
      Windows Vista 32bit SP1.

      I installed Python to C:\Program Files\Python\2.6\ and when I try to run
      idle from the start menu, it doesn't work.

      When I try to run it from the command line, the same error is displayed:

      "C:\Program Files\Python\2.6\Lib\idlelib>python idle.py
      Traceback (most recent call last):
        File "idle.py", line 21, in <module>
          idlelib.PyShell.main()
        File "C:\Programas\Python\2.6\lib\idlelib\PyShell.py", line 1386, in main
          root = Tk(className="Idle")
        File "C:\Programas\Python\2.6\lib\lib-tk\Tkinter.py", line 1643, in
      __init__
          self.tk = _tkinter.create(screenName, baseName, className,
      interactive, want
      objects, useTk, sync, use)
      _tkinter.TclError: Can't find a usable init.tcl in the following
      directories:
          {C:\Programas\Python\2.6\tcl\tcl8.5}
      C:/Programas/Python/2.6/lib/tcl8.5 C:/P
      rogramas/Python/lib/tcl8.5 C:/Programas/lib/tcl8.5
      C:/Programas/Python/library C
      :/Programas/library C:/Programas/tcl8.5.2/library C:/tcl8.5.2/library

      This probably means that Tcl wasn't installed properly."

    6. loewis commented on Jan 17, 2009

      loewismannequin
      Mannequin

      zlm, did you chose to install Tcl/Tk when installing Python?

    7. zlm commented on Jan 17, 2009

      zlmmannequin
      Mannequin

      Yes, I did.

    8. loewis commented on Jan 17, 2009

      loewismannequin
      Mannequin

      Yes, I did.

      So do you have a file C:\Programas\Python\2.6\tcl\tcl8.5\init.tcl ?

    9. zlm commented on Jan 17, 2009

      zlmmannequin
      Mannequin

      So do you have a file C:\Programas\Python\2.6\tcl\tcl8.5\init.tcl ?

      Yes, I have.

      Could this problem be related to paths with slashes and backslashes? In
      the error log, the first path (the right one) has backslashes, but the
      others have slashes.

      " {C:\Programas\Python\2.6\tcl\tcl8.5}
      C:/Programas/Python/2.6/lib/tcl8.5 C:/P
      rogramas/Python/lib/tcl8.5 C:/Programas/lib/tcl8.5
      C:/Programas/Python/library C
      :/Programas/library C:/Programas/tcl8.5.2/library C:/tcl8.5.2/library"

    10. loewis commented on Jan 17, 2009

      loewismannequin
      Mannequin

      Could this problem be related to paths with slashes and backslashes?

      Unlikely. The exact same package works on many other machines, so there
      must be something strange with your machine.

      Can you run the Sysinternals filemon to find out what files it is accessing?

    11. kimsey0 commented on Jan 17, 2009

      kimsey0mannequin
      MannequinAuthor

      I don't think it's just his machine (and mine), but i don't think so.
      Unfortunealy, i don't have a Windows Vista key ready, else i'd have
      testet it on a clean install, but i'll try to install the same package
      on the next computer with Vista i stumple upon.

    12. zlm commented on Jan 17, 2009

      zlmmannequin
      Mannequin

      Can you run the Sysinternals filemon to find out what files it is
      accessing?

      I tried Sysinternals ProcessMonitor (equivalent of filemon to Windows
      Vista), but the simple act of trying to open IDLE produces thousands of
      entries to the log window.

      I also don't think this is a problem of my machine, because i'm not the
      only one with this problem. I think this situation can be easily
      reproduced by installing Pyhton to other than the default path on
      Windows Vista.

    13. 4 remaining items

    14. loewis commented on Jan 18, 2009

      loewismannequin
      Mannequin

      I don't think thats the solution.
      "C:\Program Files\Python\2.6\" and
      "C:\Programas\Python\2.6\"
      are the same, as "C:\Program Files\Python\2.6\" is a symbolic link to
      "C:\Programas\Python\2.6\" to allow compatibility with different
      operation system languages.

      It could be a hint to the problem, though.

      Jacob: what language version is your Vista installation? Is
      "c:\Programmer" the local translation of "c:\Program Files"?

      Perhaps something doesn't work right with symbolic links on Vista.
      Unfortunately, I have only the English version of Vista for testing.

      Can you two please install Python into a non-standard folder that
      isn't a symbolic link?

    15. kimsey0 commented on Jan 18, 2009

      kimsey0mannequin
      MannequinAuthor

      Great idea :)
      Maybe we're starting to find the problem.
      I'm using a Danish version of Windows Vista Home Premium SP1, and
      C:\Programmer is the danish path for C:\Program Files.
      I'll try that, and leave another message when i'we tried it.

    16. zlm commented on Jan 18, 2009

      zlmmannequin
      Mannequin

      "Programas" is the portuguese translation to "Program Files".

      I have just installed it to C:\Test\Python and IDLE is working!

      The problem should be related to the Vista symbolic links.

    17. loewis commented on Jan 18, 2009

      loewismannequin
      Mannequin

      The problem should be related to the Vista symbolic links.

      Unfortunately, it isn't as simple as "install into a symbolic
      link, and it fails". I created c:\temp -> c:\tmp, and installed
      into c:\temp (i.e. into the symlink), and it still worked fine.

    18. devdanzin commented on Jan 19, 2009

      devdanzinmannequin
      Mannequin

      Maybe it's "install into a symbolic link pointing to a path with spaces
      in it, and idle fails"?

    19. zlm commented on Jan 19, 2009

      zlmmannequin
      Mannequin

      I reinstalled Python to "C:\Program Files\Python\" (I wrote this path in
      the installer) and IDLE works fine. I can access the Python folder by
      going to "C:\Programas\Python".

      Then, I unninstalled and installed again to "C:\Programas\Python". IDLE
      doesn't work. I can still access the Python folder by going to
      "C:\Programas\Python".

      Jacob, can you try installing it to "C:\Program Files\Python" to sse if
      that works?

    20. kimsey0 commented on Jan 20, 2009

      kimsey0mannequin
      MannequinAuthor

      Installing to C:\Program Files\Python\ worked.
      Now we just have to find out WHY it doesn't work with the
      C:\[Programmer/Programmas]\ to C:\Program Files\ link.

    21. loewis commented on Jan 20, 2009

      loewismannequin
      Mannequin

      Installing to C:\Program Files\Python\ worked.
      Now we just have to find out WHY it doesn't work with the
      C:\[Programmer/Programmas]\ to C:\Program Files\ link.

      With process monitor, I made partial progress (after installing
      the German Vista version). It looks like that there is an explicit
      Deny ACL entry for read for Everyone in the Programme symlink.
      As a consequence, os.listdir(r"c:\programme") fails, even though
      os.listdir(r"c:\program files") succeeds. It looks like Tcl wants
      to list the contents of the symlink (I'm not yet sure why), and
      that this fails (ACCESS_DENIED).

    22. loewis commented on Jan 22, 2009

      loewismannequin
      Mannequin

      Here is a patch that should fix the problem. It uses Vista's
      GetFinalPathNameByHandleW to expand symbolic links before passing the
      path to Tcl.

    23. kimsey0 commented on Jan 22, 2009

      kimsey0mannequin
      MannequinAuthor

      Fantastic.
      I started this post in October, and now we finaly found a solution.
      Thank you Martin.
      Will this patch be included in future versions of python?
      Best regards, Jacob.

    24. zlm commented on Jan 23, 2009

      zlmmannequin
      Mannequin

      I got my problem fixed in 4 days!
      Thank you for all your help, Martin!

    25. loewis commented on Jan 24, 2009

      loewismannequin
      Mannequin

      Committed as r68893, r68894, r68898, r68901.

    26. ggenellina commented on Nov 16, 2009

      ggenellinamannequin
      Mannequin

      This patch had unintended consequences; see bpo-6906

    27. transferred this issue fromon Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    No one assigned

      Labels

      OS-windowsstdlibtopic-IDLEtype-crash

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions