Geoff Alexander added the comment:
I've recently hit this problem (or one that has the same symptoms):
```
Traceback (most recent call last):
File "migration.py", line 169, in
migrate()
File "migration.py", line 80, in migrate
rtc.a
Geoff Alexander added the comment:
Here's the trace back I get from Python 3.7.2:
Traceback (most recent call last):
File "migration.py", line 169, in
migrate()
File "migration.py", line 80, in migrate
rtc.acceptchangesintoworkspace(rtc.getchangeentr
New submission from Geoff Alexander :
I've found that subprocess.check_output() fails on Windows with OSError:
[WinError 87] when the current directory's name is too long:
```
Traceback (most recent call last):
File "migration.py", line 169, in
migrate()
File &qu
Geoff Alexander added the comment:
The [WinError 87] does seems to be caused by the current directory's name being
too long. The value of len(os.getcwd())is 260 when the exception occurs. The
failing call was subprocess.check_output("git ls-files", shell=True). I've
New submission from Geoff Alexander :
I have the following code:
```
def handle_empty_directories(dir):
if os.path.exists(dir):
shouter.shout("%s exists" % dir)
else:
shouter.shout("%s doesn't exists" % dir)
Geoff Alexander added the comment:
Using the "\\?\" prefix does not work. Here's a small example:
```
import os
import subprocess
os.chdir(r"\\?\C:\Users")
output = subprocess.check_output("dir", shell=True)
```
Using Python 3.7.2 64-bit on
Change by Geoff Alexander :
--
type: -> behavior
___
Python tracker
<https://bugs.python.org/issue36243>
___
___
Python-bugs-list mailing list
Unsubscrib
Geoff Alexander added the comment:
This problem does not appear to be a race condition ("Time Of Check To Time Of
Use" bug) in my case as the directory in question exists both before and after
the os.listdir call.
I got a workaround saying to wrap the os.listdir call in try/ex
Change by Geoff Alexander :
--
status: open -> pending
___
Python tracker
<https://bugs.python.org/issue36243>
___
___
Python-bugs-list mailing list
Unsubscrib