Open rubencart opened 5 years ago
I solved this error, by using absolute path in sys.path.append() to include the coco-caption file . I still get this error running in Pycharm,but it works well by using terminal command
@rubencart hi, how can I get the name of 'tmpWS5p0Z' according to your answer.
@ynuwm that is automatically added by the line cmd.append(os.path.join(path_to_jar_dirname, os.path.basename(tmp_file.name)))
. Just change that line into cmd[0] += os.path.join(path_to_jar_dirname, os.path.basename(tmp_file.name))
ok, I get it, thank you very much.
Like in https://github.com/tylin/coco-caption/issues/22#issue-231528122 , I got
When running the evaluation, even with java definitely installed. This SO discusses it: https://stackoverflow.com/a/55675914/2332296. I was able to solve it by setting
shell=True
and makingcmd
infrom
(where 'tmpWS5p0Z' is the name of the
tempfile.NamedTemporaryFile
that is added), into: