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?