-1

I have executing a python script inside the folder /tmp/my-vehicle-detection-0203. The folder has export.py script. So

>>cd /tmp/my-vehicle-detection-0203

Then executing the script as

>>/tmp/my-vehicle-detection-0203$ python3 export.py --load-weights ${SNAPSHOT} --save-model-to export

But it is executing from another folder and error as follow.

python3: can't open file '/home/itc/intel/openvino_2021.4.582/external/mmdetection/tools/export.py': [Errno 2] No such file or directory
Traceback (most recent call last):
  File "export.py", line 41, in <module>
    main()
  File "export.py", line 37, in main
    exporter(ote_args)
  File "/home/itc/intel/openvino_2021.4.582/training_extensions/ote/ote/modules/exporters/base.py", line 31, in __call__
    self._export_to_openvino(args, tools_dir)
  File "/home/itc/intel/openvino_2021.4.582/training_extensions/ote/ote/modules/exporters/mmdetection.py", line 51, in _export_to_openvino
    run_through_shell(f'python3 {os.path.join(tools_dir, "export.py")} '
  File "/home/itc/intel/openvino_2021.4.582/training_extensions/ote/ote/utils/misc.py", line 165, in run_through_shell
    **std_streams_args)
  File "/home/itc/intel/inteloneapi/intelpython/latest/lib/python3.7/subprocess.py", line 512, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command 'python3 /home/itc/intel/openvino_2021.4.582/external/mmdetection/tools/export.py model.py snapshot.pth export  --opset=11 openvino --input_format BGR' returned non-zero exit status 2.

It is finding file inside '/home/itc/intel/openvino_2021.4.582/external/mmdetection/tools/export.py'

What could be wrong?

batuman
  • 7,066
  • 26
  • 107
  • 229

1 Answers1

0

The report suggests that inside the export.py, another command saying python3 /home/itc/intel/openvino_2021.4.582/external/mmdetection/tools/export.py model.py snapshot.pth export --opset=11 openvino --input_format BGR is called by subprocess. So it is not about finding the wrong file, instead it seems you have not set up for openvino properly.

Zebartin
  • 124
  • 10