Error code 6 when trying to convert LI file

I’m trying to run this example to have a python script grab some data and save it to file. However, when I try and convert the saved .li file to any other format, using either the GUI converter or mokucli, I get “Error code 6” and the conversion fails. moku.__version__ yields 3.0.0 and the last firmware update I did was for fw_ver=576. Is this user error on my part? The only line I changed in the example file is the IP address of my specific device.

Hi @gautam, thank you for reporting this issue.

Can share the log file with us please to have a look at where the issue originated from. Can you please email the file to support@liquidinstruments.com

Thank you!
Nandi

Thanks Nandi for looking into this, I’ve emailed the file.

Hi Gautam,

Thank you for sending through the file.

There is a bug in our Data Logger example, you will need to replace line 46, i.e. the file download command, with the following:

i.download("persist", logFile['file_name'], os.path.join(os.getcwd(), logFile['file_name']))

We are working on updating the example script on our documentation page now, thank you for pointing this out.

Kind regards,
Nandi

Great, thanks, this worked for me!

FWIW, I was able to workaround the original problem by using the start_streaming followed by the stream_to_file function calls. This had the advantage that I could stream directly to a .npy file and bypass the conversion step. However, I found the need to include (somewhat arbitrarily chosen) sleep statements between start_streaming and stop_streaming calls and subsequent python function calls. Is start_logging preferred to start_streaming from a robustness point of view? I have an MWE script that I can’t seem to upload here, but asking in case this is a known issue?

Hi @gautam,

Your latest post in this thread sounds like something that I’m also working on: we also would like to capture data with the logger and then post-process in Python immediately, so ideally we’d like to have it as .npy directly rather than .li.

Could you perhaps share (part of) your code where you implemented the start_streaming, sleep and stop_streaming?

Thanks in advance!

Daan