Skip to content

Python 3 fixes: Round 3

Patrick Godwin requested to merge py3_fixes_round3 into master

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 to key 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 with None.
  • Change how seeking is done in DiskReporter._tail to avoid io.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.

Merge request reports

Loading