Genesys Cloud - Developer Community!

 View Only

Sign Up

  • 1.  Method get_presence_definitions fails since new version 224.1.0 of the Python SDK

    Posted 04-09-2025 11:58
    Edited by Edwin Moreno Ramos 04-09-2025 12:08

    Hi  Dears, 

    I need you support and help with the next Python SDK method:

    Method: 
    method 'get_presence_definitions' in presence_api.py of PureCloudPlatformClientV2 


    Because since was released the last version of the SDK  in March 29th as you can see in the image below:


    This Method in our Code is failing generating this error:

    AttributeError: 'PresenceApi' object has no attribute 'get_presence_definitions' [while running 'ParDo(Get_presence_definitions)-ptransform-47']

    This is an example of the piece of code how we are using the method:

                 api_client = authenticate_api(proj_id) 
                 api_instance = PureCloudPlatformClientV2.PresenceApi(api_client); 
                 locale_code = 'en_US' # str | The locale code to fetch for each presence definition. Use ALL to fetch everything. (optional) 
                 deactivated='FALSE'  
                 api_response = api_instance.get_presence_definitions(deactivated=deactivated, locale_code=locale_code) 

    We are using this method because is the only that accepts to pass the arguments deactivated=deactivated, locale_code=locale_code that the customer wants to use .

    We know that there is another method like this get_presencedefinitions but the customer does not want to use it for two reasons , it seems depreacted and this function does not accept arguments mentioned before.

    For this reason we had been using the method  'get_presence_definitions' in presence_api.py of PureCloudPlatformClientV2  that was working correctly until the last new version of the SDK of March 29th.

    So, We need you support to response the next doubts:

    1.What has changed since the last version of this method that let to work since the update?

    If the method was removed, we need the next information: 

    2.Why was the method removed in the last version? 

    3.What's the replacement for that works with the arguments that we need to use? 


    Thanks in advance .

    Regards




    #PlatformSDK

    ------------------------------
    Edwin Moreno Ramos
    ------------------------------



  • 2.  RE: Method get_presence_definitions fails since new version 224.1.0 of the Python SDK
    Best Answer

    Posted 04-09-2025 14:31

    Hello,

    This was a mistake. An attempt to introduce an alias was made as /api/v2/presence/definitions and /api/v2/presencedefinitions endpoints have name conflicts for certain SDK languages.

    The method will be restored in the next build. It should be released at the end of the week.

    Regards,



    ------------------------------
    Jerome Saint-Marc
    Senior Development Support Engineer
    ------------------------------



  • 3.  RE: Method get_presence_definitions fails since new version 224.1.0 of the Python SDK

    Posted 04-09-2025 14:50
    Edited by Edwin Moreno Ramos 04-09-2025 14:56

    Hi ,Jerome , I will be doing follow up at the end of week to be sure that the restore was done how you say.

    thanks



    ------------------------------
    Edwin Moreno Ramos
    ------------------------------



  • 4.  RE: Method get_presence_definitions fails since new version 224.1.0 of the Python SDK

    Posted 04-09-2025 14:57

    This will be friday evening or saturday.



    ------------------------------
    Jerome Saint-Marc
    Senior Development Support Engineer
    ------------------------------



  • 5.  RE: Method get_presence_definitions fails since new version 224.1.0 of the Python SDK

    Posted 04-10-2025 08:34

    Hello,

    A new build was in fact triggered earlier today.

    Version 225.0.0 contains the change (the restored method).

    There will be another build for the Python SDK in a couple of days (Friday or Saturday) to update the minimum Python version (moving from 3.6 to 3.9) and to remove dependency on "six" package from code (removing from direct dependencies).

    Regards



    ------------------------------
    Jerome Saint-Marc
    Senior Development Support Engineer
    ------------------------------



  • 6.  RE: Method get_presence_definitions fails since new version 224.1.0 of the Python SDK

    Posted 04-16-2025 14:38

    Hi Jerome , the developer team confirmed that the issue was resolved after the last update in the python SDK. 

    Thanks



    ------------------------------
    Edwin Moreno Ramos
    ------------------------------