Community Q&A

Where Wwise users help each other out!

Audiokinetic's Community Q&A is the forum where Wwise users ask and answer questions within the Wwise community. If you would like to get an answer from Audiokinetic's Technical support team, make sure you use the Support Tickets page.

Bug: WAAPI object query using name doesn't work with array input, contrary to the API doc.

0 votes

From the api doc of ak.wwise.core.object.get, I can see that the query arg "name" is an array. 

So I expect that I can feed it a list of names. But the following code fails with 

('ApplicationError(error=<ak.wwise.query.unknown_object>, args=[], '
 "kwargs={'message': 'from name object is unknown', 'details': "
 "{'procedureUri': 'ak.wwise.core.object.get'}}, enc_algo=None, callee=None, "
 'callee_authid=None, callee_authrole=None, forward_for=None)')

Code:

try:
    # Connecting to Waapi using default URL
    with WaapiClient() as client:
        names = ['First', 'Second']
        object_get_args = {
            "from": {
                "name": ["SoundBank:First", "SoundBank:Second"]
            },
            "options": {
                "return": ["id", "name", "type"]
            }
        }
        result = client.call("ak.wwise.core.object.get", object_get_args)
        pprint(result)
except CannotConnectToWaapiException:
    print("Could not connect to Waapi: Is Wwise running and Wwise Authoring API enabled?")

It works if one of the names are removed.

Should I trust the doc or did I read it wrong?

 

 

 

asked May 6 in General Discussion by Saul G. (220 points)

Please sign-in or register to answer this question.

...