iotile / iotile/coretools

virtual_device tile_based not properly logging exception on import

Open
#764 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
14
Forks
7
PR merge metrics
No merged PRs in 30d

Description

I had a configuration set up to pull a virtual_tile from a configuration that is defined, but errors on import, but the failure isn't properly being raised as an ImportError.

An example tile json that can invoke this would be:

virt_tiles.json:
```
{
"device":
{
"iotile_id": 42,
"tiles":
[
{
"address": 10,
"name": "network_config"
},
{
"address": 11,
"name": "mqtt_bridge"
}
]
},

"interface":
{
"port": "/dev/tty.usbmodem11"
}
}

```

Then

```
(asyncssc) Matts-Macbook-Pro:arch_node_tasks mrunchey$ iotile -vvvvv hw --port=virtual:tile_based@virt_tiles.json
19-03-29 12:01:44.501 WAR iotile.core.dev.registry Unable to load network_config from None
ArgumentError: VirtualTile could not be found by name
Additional Information:
name: network_config

```

The expected error would be more accurately raised with an exception saying something like "importError : cannot import NetworkConfigTile:"

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.