0

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'

Vignesh K
  • 2,879
  • 2
  • 6
  • 6
  • Do you have any particular reason to think the shared drive is available to your app, or exposed within the CF foundation at all? This is a question for your administrators, there's too much we can't tell from outside and likely not much you can do to fix this yourself. – jonrsharpe Dec 23 '20 at 08:44
  • Is the file definitely not opened by you or anybody else in another program? – Dunski Dec 23 '20 at 09:00
  • can NFS service in PCF help me – Vignesh K Dec 23 '20 at 10:02

1 Answers1

0

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..

arjain13
  • 556
  • 3
  • 9
  • Thanks for that @arjain13, i have mounted successfully with qualified name but still facing the issue df=pd.read_excel('//acc.hosts.cloud.abc.com//Proj//app//Data//sep.xlsm') – Vignesh K Jan 19 '21 at 02:44
  • seems like NFS is not mounted by its reachable from PCF.. Can you go into the container and see if you can see that? – arjain13 Jan 20 '21 at 12:55
  • Yeah, you are right SMB is mounted in the container directory and now I am able to access it, thanks – Vignesh K Jan 21 '21 at 18:03
  • Great!! Would be helpful for others if you can select the answer too.. – arjain13 Jan 22 '21 at 07:53