Skip to content

Commit 2e8cd21

Browse files
committed
BF: ERROR path is on mount ‘0:’, start on mount ‘C:’
This was being raised when using a conditions file contained rows to control subsets of a conditions file. The entry (e.g. 0:5 ) would look to the code like it might be a file location (e.g. c: ) because we only used the : to indicate a file path
1 parent 95326ca commit 2e8cd21

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

psychopy/experiment/_experiment.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -744,16 +744,16 @@ def getPaths(filePath):
744744
:return: dict of 'asb' and 'rel' paths or None
745745
"""
746746
thisFile = {}
747-
if len(filePath) > 2 and (filePath[0] == "/" or filePath[1] == ":"):
747+
if len(filePath) > 2 and (filePath[0] == "/" or filePath[1] == ":")\
748+
and os.path.isfile(filePath):
748749
thisFile['abs'] = filePath
749750
thisFile['rel'] = os.path.relpath(filePath, srcRoot)
751+
return thisFile
750752
else:
751753
thisFile['rel'] = filePath
752754
thisFile['abs'] = os.path.normpath(join(srcRoot, filePath))
753-
if os.path.isfile(thisFile['abs']):
754-
return thisFile
755-
else:
756-
return None
755+
if os.path.isfile(thisFile['abs']):
756+
return thisFile
757757

758758
def findPathsInFile(filePath):
759759
"""Recursively search a conditions file (xlsx or csv)

0 commit comments

Comments
 (0)