简体   繁体   中英

How to make my python code that is hosted in PCF to read excel file from network shared drive

I could able to read excel that is there in the network shared drive when i run python code in my local, but when i try to do the same in PCF, it is throwing error like "No such file or directory", what should i do to make my code to read excel in PCF?

Shared drive path: df=pd.read_excel('//X//Proj//app//Data//sep.xlsm')

error in PCF: 2020-12-23T13:53:15.77+0530 [APP/PROC/WEB/0] ERR with open(filename, "rb") as f: 2020-12-23T13:53:15.77+0530 [APP/PROC/WEB/0] ERR FileNotFoundError: [Errno 2] No such file or directory: '//X//Proj//app//Data//sep.xlsm'

It seems like you dint mount the file share to your app and hence the issue....

If file share is mounted and accessible from pcf then would suggest to try with fully qualified name (like //fs00ab01.svr.net/Proj/app/Data/sep.xlsm) rather the X drive or something..

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM