You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
IDLE: startup problem when HOME does not exist #60066
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='https://github.com/terryjreedy'closed_at=Nonecreated_at=<Date2012-09-04.21:43:34.286>labels= ['expert-IDLE', 'type-bug', '3.7']
title='IDLE: startup problem when HOME does not exist'updated_at=<Date2017-07-10.05:56:07.434>user='https://bugs.python.org/CemalDuman'
Hi
Unfortunately i'm using Vista on my corparate laptop I can open my Python CLI without any problem but IDLE is not responding. When i started idle.py by issuing following command:
C:\Python27>python.exe Lib\idlelib\idle.py
I see following output:
C:\Python27>
Warning: os.path.expanduser("~") points to
H:\,
but the path does not exist.
H:\ is my network drive. When i run the os.path.expanduser("~") at CLI i get following directory.
I do receive the same warning messages described by Cemal, since I don't have a valid H:\ drive. However, IDLE is responsive. Running IDLE using Lib\idlelib\idle.bat fails, though.
Also, launching IDLE from the start menu still works.
This is one of multiple reports about problems with finding and reading HOME/.idlerc/*.*. I believe that if nothing else, Idle should issue a warning message (that not not crash Idle), set a flag, and continue. The configuration dialog should also warn that changes will not be saved.
This particular situation is about a Windows system with HOME set but pointing to a directory on a drive that is not currently mounted. The user could create a .bat file that resets HOME, but Idle could also try harder to find a usable directory (so that the installed version specific icons work). Currently USERPROFILE is used (in os.expanduser) as a backup if HOME does not exist. It could also be used as a backup is HOME exists buts is not usable. Dittle for HOMEDRIVE and HOMEPATH used to backup USERPROFILE. Or Idle could change 'x:somepath', where x is not 'c', to 'c:somepath'.
Or maybe Idle should recognize an IDLE_RC env var so a user like Cemal can run idle with the same set of user config files regardless of whether connected to a corporate network or not. This would also help someone (like me) who wants to use the same config files regardless of whether logged in and running as admin or normal user.
changed the title [-]IDLE not working when due to wrong Hard Drive point of os.path.expanduser[/-][+]IDLE: startup problem when HOME does not exist[/+]on Oct 5, 2014
Since 3.8, os.path.expanduser() on Windows ignores HOME and uses USERPROFILE, so a HOME pointing to an unmounted drive no longer affects IDLE. If the user profile directory itself is unavailable, #157636 makes IDLE start with default settings and show a warning instead of exiting. An IDLE_RC environment variable or XDG support would be a new feature and needs a separate issue.
Activity
CemalDuman commentedon Sep 4, 2012
Hi
Unfortunately i'm using Vista on my corparate laptop I can open my Python CLI without any problem but IDLE is not responding. When i started idle.py by issuing following command:
C:\Python27>python.exe Lib\idlelib\idle.py
I see following output:
C:\Python27>
Warning: os.path.expanduser("~") points to
H:\,
but the path does not exist.
H:\ is my network drive. When i run the os.path.expanduser("~") at CLI i get following directory.
'C:\\Users\\edumcem\'
Thanks / Cemal
serwy commentedon Sep 4, 2012
IDLE not responding is likely due to bpo-13582, since the warning message would cause IDLE to terminate abruptly when launched with pythonw.exe.
What does os.path.expanduser("~") evaluate to when executed from the IDLE shell?
serwy commentedon Sep 28, 2012
With Python 2.7.3 on Win7, I tried the following:
C:\Python27>set HOME=H:\
C:\Python27>python -m idlelib.idle
I do receive the same warning messages described by Cemal, since I don't have a valid H:\ drive. However, IDLE is responsive. Running IDLE using Lib\idlelib\idle.bat fails, though.
Also, launching IDLE from the start menu still works.
Cemal, can you confirm this?
CemalDuman commentedon Sep 30, 2012
Hi,
yes exactly...
I changed my home by using below commands.
C:\Python27>set HOME=C:\
C:\Python27>python -m idlelib.idle
it is working. But if i reboot my computer HOME changes again to network drive. I think sth abour corporate programs rewrites this paramters.
Thanks / Cemal
serwy commentedon Sep 30, 2012
In your original message, did IDLE eventually start when you ran:
C:\Python27>python.exe Lib\idlelib\idle.py
? If yes, then the bug is likely due to bpo-13582.
If I understand correctly, when you reboot your computer, IDLE won't launch from the shortcut in the start menu?
BreamoreBoy commentedon Oct 5, 2014
@terry what is your take on this?
terryjreedy commentedon Oct 5, 2014
This is one of multiple reports about problems with finding and reading HOME/.idlerc/*.*. I believe that if nothing else, Idle should issue a warning message (that not not crash Idle), set a flag, and continue. The configuration dialog should also warn that changes will not be saved.
This particular situation is about a Windows system with HOME set but pointing to a directory on a drive that is not currently mounted. The user could create a .bat file that resets HOME, but Idle could also try harder to find a usable directory (so that the installed version specific icons work). Currently USERPROFILE is used (in os.expanduser) as a backup if HOME does not exist. It could also be used as a backup is HOME exists buts is not usable. Dittle for HOMEDRIVE and HOMEPATH used to backup USERPROFILE. Or Idle could change 'x:somepath', where x is not 'c', to 'c:somepath'.
Or maybe Idle should recognize an IDLE_RC env var so a user like Cemal can run idle with the same set of user config files regardless of whether connected to a corporate network or not. This would also help someone (like me) who wants to use the same config files regardless of whether logged in and running as admin or normal user.
[-]IDLE not working when due to wrong Hard Drive point of os.path.expanduser[/-][+]IDLE: startup problem when HOME does not exist[/+]terryjreedy commentedon Jun 29, 2017
bpo-8231, msg297255 suggests some refactoring to make this sort of thing testable without crippling a developer system.
mlouielu commentedon Jul 10, 2017
Terry: How about to support XDG base directory on Unix1?
serhiy-storchaka commentedon Sep 16, 2026
Since 3.8,
os.path.expanduser()on Windows ignoresHOMEand usesUSERPROFILE, so aHOMEpointing to an unmounted drive no longer affects IDLE. If the user profile directory itself is unavailable, #157636 makes IDLE start with default settings and show a warning instead of exiting. AnIDLE_RCenvironment variable or XDG support would be a new feature and needs a separate issue.