Python issues with IPv6 address of Moku:Go

Hi All,
I am trying to connect to Moku:Go using python/spyder installation. My device is connected using a USB-C cable to the computer. I try to communicate with the Moku:go but get an invalid ip address. Please see below: any help is deeply appreciated.

(c) 2021 Liquid Instruments Pty. Ltd.

import numpy as np
from moku.instruments import WaveformGenerator
The ip address has been copied from the Moku interface
ip = '[fe80:0000:0000:0000:7269:79ff:feb9:0f16%50]'
i = WaveformGenerator(ip, force_connect=True)

InvalidURL: Failed to parse: http://[fe80:0000:0000:0000:7269:79ff:feb9:0f16P]/api/moku/claim_ownership

Hello Avinash, the way to fix this issue is to remove the percent and the numbers after it, so your ip line should just be:

ip = '[fe80:0000:0000:0000:7269:79ff:feb9:0f16]'

This is because once you connect to your Moku:Go via USBC for the first time, this port is already known so you do not need to specify it and many version of python (and LabVIEW for that matter) have some strange typecasing for when the % is used and treats it as modulus. Please let me know if you encounter any other problems!

Hi Sam, Your suggestion fixed the problem. Thanks!