Browse Source

More helpful error if exemplar stream doesn't exist

tags/nilmtools-1.3.3^0
Jim Paris 9 years ago
parent
commit
2bdcee2c36
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      nilmtools/trainola.py

+ 3
- 0
nilmtools/trainola.py View File

@@ -54,6 +54,9 @@ class Exemplar(object):
# Get stream info
self.client = nilmdb.client.numpyclient.NumpyClient(self.url)
self.info = nilmtools.filter.get_stream_info(self.client, self.stream)
if not self.info:
raise DataError(sprintf("exemplar stream '%s' does not exist " +
"on server '%s'", self.stream, self.url))

# Build up name => index mapping for the columns
self.columns = build_column_mapping(exinfo['columns'], self.info)


Loading…
Cancel
Save