I am getting this error while converting .onno model into blob file.

Traceback (most recent call last):
File "C:\Users\Saif Ullah\AppData\Local\Programs\Python\Python39\lib\runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Users\Saif Ullah\AppData\Local\Programs\Python\Python39\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "C:\Users\Saif Ullah\AppData\Local\Programs\Python\Python39\lib\site-packages\blobconverter__main__.py", line 3, in <module>
run_cli()
File "C:\Users\Saif Ullah\AppData\Local\Programs\Python\Python39\lib\site-packages\blobconverter__init__.py", line 495, in run_cli
return from_onnx(
File "C:\Users\Saif Ullah\AppData\Local\Programs\Python\Python39\lib\site-packages\blobconverter__init.py", line 359, in from_onnx
return compile_blob(blob_name=Path(model_name).stem, req_data={"name": Path(model_name).stem}, req_files=files, data_type=data_type, **kwargs)
File "C:\Users\Saif Ullah\AppData\Local\Programs\Python\Python39\lib\site-packages\blobconverter__init
.py", line 280, in compile_blob
response.raise_for_status()
File "C:\Users\Saif Ullah\AppData\Roaming\Python\Python39\site-packages\requests\models.py", line 953, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 400 Client Error: BAD REQUEST for url: http://blobconverter.luxonis.com/compile?version=2021.4

while my blob version information is as follow

Name: blobconverter
Version: 1.2.0
Summary: The tool that allows you to covert neural networks to MyriadX blob
Home-page: https://github.com/luxonis/blobconverter
Author: Luxonis
Author-email: support@luxonis.com
License: MIT
Location: c:\users\saif ullah\appdata\local\programs\python\python39\lib\site-packages
Requires: PyYAML, requests, boto3
Required-by: depthai-sdk

Can you please point where I am doing anything wrong?

  • erik replied to this.

    Hello ShahidHussain , not sure if this is related but I have also noticed an issue when converting onnx->blob, issue here. If it's not the same, please open a new issue on github.
    Thanks, Erik

    2 years later

    is this issue resolved? I am getting same error:

    Downloading /home/sonnet/.cache/blobconverter/model_openvino_2022.1_5shave.blob...

    /home/sonnet/anaconda3/envs/traffic/lib/python3.7/site-packages/boto3/compat.py:82: PythonDeprecationWarning: Boto3 will no longer support Python 3.7 starting December 13, 2023. To continue receiving service updates, bug fixes, and security updates please upgrade to Python 3.8 or later. More information can be found here: https://aws.amazon.com/blogs/developer/python-support-policy-updates-for-aws-sdks-and-tools/

    warnings.warn(warning, PythonDeprecationWarning)

    {

    "exit_code": 1,

    "message": "Command failed with exit code 1, command: /opt/intel/openvino2022_1/tools/compile_tool/compile_tool -m /tmp/blobconverter/388b5f8de1b74433bcb6ccf9e435af30/model/FP16/model.xml -o /tmp/blobconverter/388b5f8de1b74433bcb6ccf9e435af30/model/FP16/model.blob -c /tmp/blobconverter/388b5f8de1b74433bcb6ccf9e435af30/myriad_compile_config.txt -d MYRIAD -ip U8",

    "stderr": "Cannot get length of dynamic dimension\n",

    "stdout": "OpenVINO Runtime version ......... 2022.1.0\nBuild ........... 2022.1.0-7019-cdb9bec7210-releases/2022/1\nNetwork inputs:\n input_2 : u8 / [...]\nNetwork outputs:\n dense/sink_port_0 : f16 / [...]\n"

    }

    Traceback (most recent call last):

    File "saving_blob.py", line 8, in <module>

    shaves=5,

    File "/home/sonnet/anaconda3/envs/traffic/lib/python3.7/site-packages/blobconverter/__init__.py", line 473, in from_openvino

    return compile_blob(blob_name=Path(xml_name).stem, req_data={"name": Path(xml_name).stem}, req_files=files, **kwargs)

    File "/home/sonnet/anaconda3/envs/traffic/lib/python3.7/site-packages/blobconverter/__init__.py", line 318, in compile_blob

    response.raise_for_status()

    File "/home/sonnet/anaconda3/envs/traffic/lib/python3.7/site-packages/requests/models.py", line 1021, in raise_for_status

    raise HTTPError(http_error_msg, response=self)

    requests.exceptions.HTTPError: 400 Client Error: BAD REQUEST for url: https://blobconverter.luxonis.com/compile?version=2022.1&no_cache=False

      Hi heebahsaleem
      Your error seems to stem from the

      heebahsaleem "stderr": "Cannot get length of dynamic dimension\n",

      If your model has layers with dynamic or undefined dimensions, you might need to specify these dimensions explicitly before converting the model.

      Thanks,
      Jaka

      heebahsaleem

      Thanks, I added the dimensions and it solved it.

      mo --input-model classifier/model.onnx --input-shape [2,300,300,3]