Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

os.system error #19

Closed
YoungJ-Baek opened this issue Mar 13, 2020 · 4 comments
Closed

os.system error #19

YoungJ-Baek opened this issue Mar 13, 2020 · 4 comments
Assignees

Comments

@YoungJ-Baek
Copy link

I'm trying to use os.system( ) to use FlowNet and convertion together by running one .py file.
However there is a problem

this command works for me ( compare 2 images)
os.system("bash run-network.sh -n FlowNet2-c -v data/0000000-imgL.png data/0000001-imgL.png flow.flo")

but another command doesn't work for me ( multiple comparison )
os.system("run-network.sh -n FlowNet2-s -g 0 -vv data/flow-first-images.txt data/flow-second-images.txt data/flow-outputs.txt")

after running that command, I get

Using GPU: 0 Running network: FlowNet2 Working dir: /flownet2/flownet2/scripts First input: data/flow-first-images.txt Second input: data/flow-second-images.txt Output: data/flow-outputs.txt /flownet2/flownet2/scripts Done!

However there's no result files.
Also there's no log command while running.
How can I solve this problem?

@nikolausmayer
Copy link
Contributor

The second command should put its output files into the data/ subfolder. Did you check there? If this does not work, try changing some of the options (-n FlowNet2-s vs -n FlowNet2-c etc).

@nikolausmayer nikolausmayer self-assigned this Mar 13, 2020
@YoungJ-Baek
Copy link
Author

I check all but still don't work
But it's strange because when I type same command in terminal directly, it works while it doesn't work when I use os.system()
Hmm..I'll check other options.

@nikolausmayer
Copy link
Contributor

Could it be because of the bash in your first run? I do not know which shell os.system uses by default. If I did not write the runscript to be properly portable (as may well be the case), using another shell may just not work.

@YoungJ-Baek
Copy link
Author

Thank you for comment!
I couldn't solve the problem but I decide to run the command in terminal, not by python file.
Thank you again and your program is helping my project hugely

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants