Python 3 fixes: Round 3
This PR fixes a few more issues with running iDQ with python 3.
- OVL had a few stray
dict.has_key(key)
which was changed tokey in dict
. - Reading channels from veto lists had a few issues since they're encoded as byte arrays rather than strings when reading back from the numpy arrays. All the relevant channel calls now have explicit
channel.decode('utf-8')
to handle this. - A few more casts of hdf5 attribute strings to
np.string_(str)
. - plots.py:
iter.next()
->next(iter)
. - reports.py: Empty quivers have their start and end times explicitly set so that calling
append_quiver()
on globbed quivers doesn't cause errors due to comparisons withNone
. - Change how seeking is done in
DiskReporter._tail
to avoidio.UnsupportedOperation
. See https://stackoverflow.com/a/51131242. -
KafkaConsumer.offset_for_times()
expects an int for the offset, so there's now a cast to ensure this.
I've tested a few combinations, batch/stream, OVL/sklearn, python2/python3, with/without timeseries and with/without reports.