1

I am trying to run a python a script which will update my elasticsearch data base, from a server which is implemented in node.js. My python script requires a csv files to read. though the csv file is present it is giving me this error(shown in imageerror)

7
  • "File link_myntra_blazers.csv does not exist". Seems to be self-explanatory. Commented May 2, 2017 at 11:17
  • I think you will need to specify the directory relative to where your Node script is running from, rather than the Python one. Commented May 2, 2017 at 11:17
  • did the specified csv file exists in folder where python script is placed? Commented May 2, 2017 at 11:18
  • @KarthikeyanKR yes the csv is present Commented May 2, 2017 at 11:18
  • if so then please try specifying the file name with path, eg: etc/folder/file.csv Commented May 2, 2017 at 11:20

1 Answer 1

3

I think you will need to specify the filepaths relative to where your Node script is running from, rather than the Python one.

So if you have file structure:

- app.js
- /PythonFolder
   - script.py
   - data.csv

You will need to call the Python using whatever the equivalent to:

python script.py PythonFolder/data.csv 

is from Node.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.