# Tao inference error on LPRnet

**URL:** <https://forums.developer.nvidia.com/t/tao-inference-error-on-lprnet/197788>\
**Category:** TAO Toolkit\
**Created:** [December 12, 2021, 6:00pm UTC](https://forums.developer.nvidia.com/t/tao-inference-error-on-lprnet/197788 "2021-12-12T18:00:33Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![pourreza.masoud](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/pourreza.masoud/32/138696_2.png) [@pourreza.masoud](https://forums.developer.nvidia.com/u/pourreza.masoud)\
**Post date:** [December 12, 2021, 6:00pm UTC](https://forums.developer.nvidia.com/t/tao-inference-error-on-lprnet/197788/1 "2021-12-12T18:00:33Z")

</div>

• Hardware (AGX Xavier)  
• Network Type (LPRnet)  
• TLT Version (last version)

**I get below error when I am going to use tao inference on lprnet**

```nohighlight
Traceback (most recent call last):
  File "/home/.local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 677, in urlopen
    chunked=chunked,
  File "/home/.local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 392, in _make_request
    conn.request(method, url, **httplib_request_kw)
  File "/usr/lib/python3.6/http/client.py", line 1281, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/usr/lib/python3.6/http/client.py", line 1327, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "/usr/lib/python3.6/http/client.py", line 1276, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/usr/lib/python3.6/http/client.py", line 1042, in _send_output
    self.send(msg)
  File "/usr/lib/python3.6/http/client.py", line 980, in send
    self.connect()
  File "/home/.local/lib/python3.6/site-packages/docker/transport/unixconn.py", line 43, in connect
    sock.connect(self.unix_socket)
PermissionError: [Errno 13] Permission denied

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/.local/lib/python3.6/site-packages/requests/adapters.py", line 449, in send
    timeout=timeout
  File "/home/.local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 727, in urlopen
    method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2]
  File "/home/.local/lib/python3.6/site-packages/urllib3/util/retry.py", line 403, in increment
    raise six.reraise(type(error), error, _stacktrace)
  File "/home/.local/lib/python3.6/site-packages/urllib3/packages/six.py", line 734, in reraise
    raise value.with_traceback(tb)
  File "/home/.local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 677, in urlopen
    chunked=chunked,
  File "/home/.local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 392, in _make_request
    conn.request(method, url, **httplib_request_kw)
  File "/usr/lib/python3.6/http/client.py", line 1281, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/usr/lib/python3.6/http/client.py", line 1327, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "/usr/lib/python3.6/http/client.py", line 1276, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/usr/lib/python3.6/http/client.py", line 1042, in _send_output
    self.send(msg)
  File "/usr/lib/python3.6/http/client.py", line 980, in send
    self.connect()
  File "/home/.local/lib/python3.6/site-packages/docker/transport/unixconn.py", line 43, in connect
    sock.connect(self.unix_socket)
urllib3.exceptions.ProtocolError: ('Connection aborted.', PermissionError(13, 'Permission denied'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/.local/lib/python3.6/site-packages/docker/api/client.py", line 205, in _retrieve_server_version
    return self.version(api_version=False)["ApiVersion"]
  File "/home/.local/lib/python3.6/site-packages/docker/api/daemon.py", line 181, in version
    return self._result(self._get(url), json=True)
  File "/home/.local/lib/python3.6/site-packages/docker/utils/decorators.py", line 46, in inner
    return f(self, *args, **kwargs)
  File "/home/.local/lib/python3.6/site-packages/docker/api/client.py", line 228, in _get
    return self.get(url, **self._set_request_timeout(kwargs))
  File "/home/.local/lib/python3.6/site-packages/requests/sessions.py", line 543, in get
    return self.request('GET', url, **kwargs)
  File "/home/.local/lib/python3.6/site-packages/requests/sessions.py", line 530, in request
    resp = self.send(prep, **send_kwargs)
  File "/home/.local/lib/python3.6/site-packages/requests/sessions.py", line 643, in send
    r = adapter.send(request, **kwargs)
  File "/home/.local/lib/python3.6/site-packages/requests/adapters.py", line 498, in send
    raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', PermissionError(13, 'Permission denied'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/.local/bin/tao", line 8, in <module>
    sys.exit(main())

    args[1:]
  File "/home/.local/lib/python3.6/site-packages/tlt/components/instance_handler/local_instance.py", line 297, in launch_command
    docker_handler = self.handler_map[
  File "/home/.local/lib/python3.6/site-packages/tlt/components/instance_handler/local_instance.py", line 152, in handler_map
    docker_mount_file=os.getenv("LAUNCHER_MOUNTS", DOCKER_MOUNT_FILE)
  File "/home/.local/lib/python3.6/site-packages/tlt/components/docker_handler/docker_handler.py", line 62, in __init__
    self._docker_client = docker.from_env()
  File "/home/.local/lib/python3.6/site-packages/docker/client.py", line 85, in from_env
    timeout=timeout, version=version, **kwargs_from_env(**kwargs)
  File "/home/.local/lib/python3.6/site-packages/docker/client.py", line 40, in __init__
    self.api = APIClient(*args, **kwargs)
  File "/home/.local/lib/python3.6/site-packages/docker/api/client.py", line 188, in __init__
    self._version = self._retrieve_server_version()
  File "/home/.local/lib/python3.6/site-packages/docker/api/client.py", line 213, in _retrieve_server_version
    'Error while fetching server API version: {0}'.format(e)
docker.errors.DockerException: Error while fetching server API version: ('Connection aborted.', PermissionError(13, 'Permission denied'))

```

---

<div class="post-metadata">

**Author:** ![Morganh](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/morganh/32/9748_2.png) [@Morganh](https://forums.developer.nvidia.com/u/Morganh)\
**Post date:** [December 13, 2021, 8:09am UTC](https://forums.developer.nvidia.com/t/tao-inference-error-on-lprnet/197788/3 "2021-12-13T08:09:03Z")

</div>

Refer to [An error occurred while preparing the data set using TAO - #11 by Morganh](https://forums.developer.nvidia.com/t/an-error-occurred-while-preparing-the-data-set-using-tao/190098/11)

Are you triggering tao docker based on one docker?  
In this case, please  
add `-v /var/run/docker.sock:/var/run/docker.sock`

---

<div class="post-metadata">

**Author:** ![pourreza.masoud](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/pourreza.masoud/32/138696_2.png) [@pourreza.masoud](https://forums.developer.nvidia.com/u/pourreza.masoud)\
**Post date:** [December 13, 2021, 3:32pm UTC](https://forums.developer.nvidia.com/t/tao-inference-error-on-lprnet/197788/4 "2021-12-13T15:32:46Z")

</div>

I have added -v command to the main command and I get below message

```auto
~/.tao_mounts.json wasn't found. Falling back to obtain mount points and docker configs from ~/.tlt_mounts.json.
Please note that this will be deprecated going forward.

```

---

<div class="post-metadata">

**Author:** ![Morganh](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/morganh/32/9748_2.png) [@Morganh](https://forums.developer.nvidia.com/u/Morganh)\
**Post date:** [December 13, 2021, 3:34pm UTC](https://forums.developer.nvidia.com/t/tao-inference-error-on-lprnet/197788/5 "2021-12-13T15:34:38Z")

</div>

Usually you can ignore this message.  
Can you share the full command and full log?

---

<div class="post-metadata">

**Author:** ![pourreza.masoud](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/pourreza.masoud/32/138696_2.png) [@pourreza.masoud](https://forums.developer.nvidia.com/u/pourreza.masoud)\
**Post date:** [December 13, 2021, 3:36pm UTC](https://forums.developer.nvidia.com/t/tao-inference-error-on-lprnet/197788/6 "2021-12-13T15:36:36Z")

</div>

Command

```auto
tao inference lprnet -i 0774KF.jpg -m us_lprnet_baseline18_trainable.tlt -v /var/run/docker.sock:/var/run/docker.sock

```

Log:

```auto
~/.tao_mounts.json wasn't found. Falling back to obtain mount points and docker configs from ~/.tlt_mounts.json.
Please note that this will be deprecated going forward.
usage: tao [-h]
           {list,stop,info,action_recognition,augment,bpnet,classification,converter,detectnet_v2,dssd,efficientdet,emotionnet,faster_rcnn,fpenet,gazenet,gesturenet,heartratenet,intent_slot_classification,lprnet,mask_rcnn,multitask_classification,n_gram,punctuation_and_capitalization,question_answering,retinanet,spectro_gen,speech_to_text,speech_to_text_citrinet,ssd,text_classification,token_classification,unet,vocoder,yolo_v3,yolo_v4,yolo_v4_tiny}
           ...
tao: error: invalid choice: 'inference' (choose from 'list', 'stop', 'info', 'action_recognition', 'augment', 'bpnet', 'classification', 'converter', 'detectnet_v2', 'dssd', 'efficientdet', 'emotionnet', 'faster_rcnn', 'fpenet', 'gazenet', 'gesturenet', 'heartratenet', 'intent_slot_classification', 'lprnet', 'mask_rcnn', 'multitask_classification', 'n_gram', 'punctuation_and_capitalization', 'question_answering', 'retinanet', 'spectro_gen', 'speech_to_text', 'speech_to_text_citrinet', 'ssd', 'text_classification', 'token_classification', 'unet', 'vocoder', 'yolo_v3', 'yolo_v4', 'yolo_v4_tiny')

```

---

<div class="post-metadata">

**Author:** ![Morganh](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/morganh/32/9748_2.png) [@Morganh](https://forums.developer.nvidia.com/u/Morganh)\
**Post date:** [December 13, 2021, 3:45pm UTC](https://forums.developer.nvidia.com/t/tao-inference-error-on-lprnet/197788/7 "2021-12-13T15:45:19Z")

</div>

The command is not expected.  
The " -v /var/run/docker.sock:/var/run/docker.sock" is added for triggering docker.

More, I realize that you are trying to run inference in **Xaiver.**  
As I mentioned, please follow [GitHub - NVIDIA-AI-IOT/deepstream\_lpr\_app: Sample app code for LPR deployment on DeepStream](https://github.com/NVIDIA-AI-IOT/deepstream_lpr_app) to download etlt model and then generate tensorrt engine for running inference.

Or refer to running LPR inference via triton server. [GitHub - NVIDIA-AI-IOT/tao-toolkit-triton-apps at dev-morgan/add-lprnet-triton](https://github.com/NVIDIA-AI-IOT/tao-toolkit-triton-apps/tree/dev-morgan/add-lprnet-triton)

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/system/32/68080_2.png) [@system](https://forums.developer.nvidia.com/u/system)\
**Post date:** [January 4, 2022, 1:57am UTC](https://forums.developer.nvidia.com/t/tao-inference-error-on-lprnet/197788/9 "2022-01-04T01:57:30Z")

</div>

Closed on January 4, 2022, 1:57am UTC

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
