![]() The os.stat test shows that accessing the path with brackets fails with ERROR_PATH_NOT_FOUND (3), which is either from a missing path component or a path that's too long. On using glob and os.path.exists: for i in range(0,1):įor filename in glob.glob(fpath "\\" ldir "\\" "*Interim*.xlsx"): The file seem to work on local drive but not on network drive even if I change the cwd to the file location. I tried renaming with shutil but it gives me the same error pyfile('abcd (xyz-9) Interim Report 01-03-18.xlsx','test.xlsx') If I remove brackets and rename file to 'abcd Interim Report 01-03-18.xlsx', then it works fine. I am trying to read excel file with pandas.
0 Comments
Leave a Reply. |