Issues connecting with Python API

Moku model:Moku:pro
Operating system:Windows 11
Software version:Python 3.12.5

Bug or support request description:

I am trying to connect to the moku:pro using the Python API. I get the error:

moku.exceptions.NoInstrumentBitstream: Instrument files not available, please run `mokucli instrument download 4.2.1` to download latest instrument data

The device is on:

MokuOS: 4.2.1

Firmware version: 639.0

API server: 4.2.1.1

I have tried both the fix suggested (mokucli instrument download 4.2.1) and the fixes described here https://knowledge.liquidinstruments.com/python-api-examples/troubleshooting-instrument-files-not-available-error

What’s confusing me is the initial exception:

moku.exceptions.MokuException: Cannot find C:\Users\Platform1\AppData\Roaming\Moku\data\instruments\20256\mokupro\03-000.bar

I have installed 4.2.1 multiple times now, and every time the mokupro folder has no 03-000.bar file, it only has files beginning with 01 and 04 (the other moku types have this file, but not mokupro).

Is there something wrong with the way I’m installing the files?

Thanks so much!

Hello @abarnett ,

Thank you for reaching out! I suspect the error is coming from the platform_id parameter in the initial connection. Moku:Pro only supports platform_id=4 because the Pro only has a 4-slot Multi-instrument configuration. Changing the connection line to m=MultiInstrument(‘IP’, platform_id=4, force_connect=True) should fix the issue. Hope this helps!

-Dylan

Hi Dylan, that is exactly the issue we were having, thank you so much!

  • Adam