[英]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?当我在本地运行 python 代码时,我可以读取网络共享驱动器中存在的 excel,但是当我尝试在 PCF 中执行相同操作时,它会抛出类似“没有这样的文件或目录”的错误,我应该怎么办如何让我的代码在 PCF 中读取 excel?
Shared drive path: df=pd.read_excel('//X//Proj//app//Data//sep.xlsm')共享驱动器路径: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' 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] 没有这样的文件或目录:'//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..如果文件共享已安装并可从 pcf 访问,则建议尝试使用完全限定名称(如 //fs00ab01.svr.net/Proj/app/Data/sep.xlsm)而不是 X 驱动器或其他东西。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.