Problem with get_stream_data returning None

Moku model: Moku:Lab
Operating system: macOS 13.4.1
Software version: 3.0.1
Python API version: 3.0.0

Bug or support request description:

I’ve had a strange problem where I’ve been successfully using the data streaming with the Datalogger instrument, but it suddenly has started returning only None. Here’s a MWE.

from moku.instruments import Datalogger
i = Datalogger(
    '[my_ipv6_address]',
    force_connect=True,
    session_trust_env=False,
)
i.start_streaming(duration=10)
data = i.get_stream_data()
# Print out the data
print(data['time'], data['ch1'], data['ch2'])
i.relinquish_ownership()

This errors like so:

---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
Cell In[6], line 6
      4 data = i.get_stream_data()
      5 # Print out the data
----> 6 print(data['time'], data['ch1'], data['ch2'])
      7 i.relinquish_ownership()

TypeError: 'NoneType' object is not subscriptable

Meaning that data is being returned as None. Is this a known issue? I’ve tried unplugging and replugging the USB cable, restarting the Moku, but the issue seems to persist. When I run the cell, it does look like the Moku is taking data, as the Python code takes ownership of the Moku and the channel lights will change to whatever setup I wish. I can also successfully save data to a file, so my computer is definitely connected to the Moku. Any suggestions on how to get the streaming working again?

Coming back to this, as I’m hoping to use the get stream data functionality with the Datalogger to very quickly plot power spectral densities through the command line. Below is another (similar) attempt at using the streaming.

import time
from moku.instruments import Datalogger
i = Datalogger('[ipv6_addess_moku_lab]', force_connect=True, session_trust_env=False)
i.set_samplerate(1.25e5)
i.set_frontend(1, '1MOhm', 'AC', '1Vpp')
resp = i.start_streaming(duration=1)
while i.get_stream_status()['status'] == "RUNNING":
    time.sleep(1)
status = i.get_stream_status()
data = i.get_stream_data()
chunks = []
for ch in range(status['no_of_chunks']):
    chunks.append(i.get_chunk())
i.relinquish_ownership()

The status variable returns:

{'available_memory': 618893312,
 'cumulative_size': 1080400,
 'error': '',
 'no_of_chunks': 15,
 'status': 'COMPLETED',
 'stream_id': 'logsink0'}

and the chunks list returns the binary data from a LI file, here’s the lengths of the chunks:

>>> print([len(ch) for ch in chunks])
[672, 70056, 70056, 110352, 110352, 63440, 63440, 62816, 62816, 63280, 63280, 110704, 110704, 59216, 59216]

So there is clearly data being saved to a buffer, but for some reason get_stream_data keeps returning None instead of any data. Any recommendations? Thanks!