File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -76,18 +76,22 @@ def path_to_datafile(filename):
76
76
print ("path_to_data: " , filename , __file__ )
77
77
filename = Path (filename )
78
78
79
+ import os
80
+
79
81
if filename .parent == Path ():
80
82
# just a filename, no path, assume it is in roboticstoolbox/data
81
83
p = Path (__file__ ).parent .parent / 'data' / filename
82
84
print (f"p={ p } " )
85
+ print (p .exists (), os .path .exists (str (p )))
83
86
if p .exists ():
84
87
print (f"returning" )
85
88
return str (p .resolve ())
86
89
87
90
88
91
p = filename .expanduser ()
92
+ print (f"continuing, filename={ filename } , p={ p } " )
89
93
p = p .resolve ()
90
- print (f"continuing p={ p } " )
94
+ print (f"after resolve p={ p } " )
91
95
if not p .exists ():
92
96
print (f"File '{ p } ' does not exist" )
93
97
raise FileNotFoundError (f"File '{ p } ' does not exist" )
You can’t perform that action at this time.
0 commit comments