This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: os.stat errors when using shared drive on XP or NT
Type: behavior Stage: test needed
Components: Windows Versions: Python 2.6
process
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: Nosy List: ajaksu2, nnorwitz, ocean-city, zeke_matzke
Priority: normal Keywords:

Created on 2004-09-13 22:26 by zeke_matzke, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (5)
msg60565 - (view) Author: zeke (zeke_matzke) Date: 2004-09-13 22:26
The problem is when a file is executed from a shared drive
then no letter drive name exists. So the result returned
by os.path.exists(os.getcwd()) does not return true.
Problem exists for both Active State and Idle on windows
for both XP and NT2000: The problem is with os.stat even
though the file open seems to work ok. Notice other
error for Active State Python.

Python 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200
32 bit (Intel)] on win32
Type "copyright", "credits" or "license()" for more
information.

IDLE 1.0.2      ==== No Subprocess ====
>>> import os
>>> os.getcwd()
'\\\\Tardis\\QCOS'
>>> os.path.exists(os.getcwd())
False
>>> os.stat(os.getcwd())
Traceback (most recent call last):
  File "<pyshell#4>", line 1, in ?
    os.stat(os.getcwd())
OSError: [Errno 2] No such file or directory:
'\\\\Tardis\\QCOS'
>>> 



PythonWin 2.3.2 (#49, Nov 13 2003, 10:34:54) [MSC
v.1200 32 bit (Intel)] on win32.
Portions Copyright 1994-2001 Mark Hammond
(mhammond@skippinet.com.au) - see 'Help/About
PythonWin' for further copyright information.
>>> Traceback (most recent call last):
  File
"C:\Python23\Lib\site-packages\Pythonwin\pywin\framework\intpyapp.py",
line 332, in OnFileRun
    scriptutils.RunScript(None, None, showDlg)
  File
"C:\Python23\Lib\site-packages\Pythonwin\pywin\framework\scriptutils.py",
line 259, in RunScript
    path = win32ui.FullPath(path)
win32ui: The file name is invalid
win32ui: Error in Command Message handler for command
ID 36864, Code 0
>>> import os
>>> os.getcwd()
'\\\\Tardis\\QCOS'
>>> os.path.exists(os.getcwd())
False
>>> os.stat(os.getcwd())
Traceback (most recent call last):
  File "<interactive input>", line 1, in ?
OSError: [Errno 2] No such file or directory:
'\\\\Tardis\\QCOS'
>>>

msg60566 - (view) Author: Neal Norwitz (nnorwitz) * (Python committer) Date: 2005-10-03 06:04
Logged In: YES 
user_id=33168

Can you propose a patch that would correct this problem?
msg82071 - (view) Author: Daniel Diniz (ajaksu2) * (Python triager) Date: 2009-02-14 14:43
Needs confirmation.
msg82081 - (view) Author: Hirokazu Yamamoto (ocean-city) * (Python committer) Date: 2009-02-14 15:39
I tried on Win2000, I cannot reproduce this bug. Probably this issue was
fixed at some point.
msg82091 - (view) Author: Hirokazu Yamamoto (ocean-city) * (Python committer) Date: 2009-02-14 16:54
I'll close this entry. Please reopen if something left. (ex: not work on
XP or so)
History
Date User Action Args
2022-04-11 14:56:07adminsetgithub: 40908
2009-02-14 16:54:49ocean-citysetstatus: open -> closed
resolution: out of date
messages: + msg82091
2009-02-14 15:39:57ocean-citysetnosy: + ocean-city
messages: + msg82081
2009-02-14 14:43:13ajaksu2settype: behavior
stage: test needed
messages: + msg82071
nosy: + ajaksu2
versions: + Python 2.6, - Python 2.3
2004-09-13 22:26:27zeke_matzkecreate