|
|
@@ -324,20 +324,14 @@ class NilmDB(object): |
|
|
|
# 3 months worth of data at 8 KHz. It's OK if this is wrong. |
|
|
|
exp_rows = 8000 * 60*60*24*30*3 |
|
|
|
|
|
|
|
# Use a light compression filter. zlib is supported |
|
|
|
# everywhere; blosc may be better in the future. |
|
|
|
compfilt = tables.Filters(complevel = 1, |
|
|
|
complib = 'zlib') |
|
|
|
|
|
|
|
# Create the table |
|
|
|
try: |
|
|
|
table = self.h5file.createTable(group, |
|
|
|
node, |
|
|
|
description = desc, |
|
|
|
expectedrows = exp_rows, |
|
|
|
createparents = True, |
|
|
|
filters = compfilt) |
|
|
|
except (AttributeError, TypeError): |
|
|
|
createparents = True) |
|
|
|
except AttributeError: |
|
|
|
# Trying to create e.g. /foo/bar/baz when /foo/bar is already |
|
|
|
# a table raises this error. |
|
|
|
raise ValueError("error creating table at that path") |
|
|
|