You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PythonShell.run('file-importer-lite.py', options, function (err) {
I am getting a:
{ Error: IOError: [Errno 2] No such file or directory: ' /var/upload/file-importer/config.json'
at PythonShell.parseError (/var/upload/bridges/nodejs/node_modules/python-shell/index.js:184:17)
at terminateIfNeeded (/var/upload/bridges/nodejs/node_modules/python-shell/index.js:98:28)
at ChildProcess. (/var/upload/bridges/nodejs/node_modules/python-shell/index.js:89:9)
at ChildProcess.emit (events.js:182:13)
at Process.ChildProcess._handle.onexit (internal/child_process.js:237:12)
----- Python Traceback -----
File "/var/upload/file-importer/file-importer-lite.py", line 269, in <module>
main()
File "/var/upload/file-importer/file-importer-lite.py", line 251, in main
with open(config_path) as conf_file:
traceback:
'Traceback (most recent call last):\n File "/var/upload/file-importer/file-importer-lite.py", line 269, in \n main()\n File "/var/upload/file-importer/file-importer-lite.py", line 251, in main\n with open(config_path) as conf_file:\nIOError: [Errno 2] No such file or directory: ' /var/upload/file-importer/config.json'\n',
executable: 'python',
options: null,
script: '/var/upload/file-importer/file-importer-lite.py',
args:
[ '-f '/var/upload/xxx.zip'',
'-d xxx',
'-p /xxxx/xxx',
'-u xxx',
'-c /var/upload/file-importer/config.json',
'-e dev' ],
exitCode: 1 }
error even though the file exists. What am I doing wrong? I even tried giving a relative path to this file, but to no avail.
Any suggestions?
Thanks,
Vishal.
The text was updated successfully, but these errors were encountered:
vishaln79
changed the title
No such file or directory
No such file or directory error
Jul 26, 2018
I have a similar problem and I believe what it may be doing is looking in this path due to the script path, but I'm unsure. /var/upload/file-importer/var/upload/file-importer/config.json
Im not a collaborator, but I think you paths are wrong as they are neither absolute nor relative.
Absolute paths would be something like this: 'C:/user/username/.../folderx/filex.py'
and relative Paths use this Notation: './folderx/filex.py'
./ = same Directory, ../ = one Directory up ../../ = 2 Directorys up.
You also can use the npm module 'path' and use path.resolve('yourPath');
At the end the full absolute Path should be printed by python shell.
I am trying to run a python script within node:
var options = {
PythonShell.run('file-importer-lite.py', options, function (err) {
I am getting a:
{ Error: IOError: [Errno 2] No such file or directory: ' /var/upload/file-importer/config.json'
at PythonShell.parseError (/var/upload/bridges/nodejs/node_modules/python-shell/index.js:184:17)
at terminateIfNeeded (/var/upload/bridges/nodejs/node_modules/python-shell/index.js:98:28)
at ChildProcess. (/var/upload/bridges/nodejs/node_modules/python-shell/index.js:89:9)
at ChildProcess.emit (events.js:182:13)
at Process.ChildProcess._handle.onexit (internal/child_process.js:237:12)
traceback:
'Traceback (most recent call last):\n File "/var/upload/file-importer/file-importer-lite.py", line 269, in \n main()\n File "/var/upload/file-importer/file-importer-lite.py", line 251, in main\n with open(config_path) as conf_file:\nIOError: [Errno 2] No such file or directory: ' /var/upload/file-importer/config.json'\n',
executable: 'python',
options: null,
script: '/var/upload/file-importer/file-importer-lite.py',
args:
[ '-f '/var/upload/xxx.zip'',
'-d xxx',
'-p /xxxx/xxx',
'-u xxx',
'-c /var/upload/file-importer/config.json',
'-e dev' ],
exitCode: 1 }
error even though the file exists. What am I doing wrong? I even tried giving a relative path to this file, but to no avail.
Any suggestions?
Thanks,
Vishal.
The text was updated successfully, but these errors were encountered: