SPSS Statistics

 View Only
Expand all | Collapse all

Python SPSS - constant problems with license

  • 1.  Python SPSS - constant problems with license

    Posted Fri September 23, 2022 07:19 AM
    Hello. I'm developing a script which contains both `SpssClient` API and spss API. This script first gets a filename of the opened active dataset (using SpssClient) and second, starts performing operations using spss API. Note: SpssClient and spss instances are not nested meaning all spss API operations are done after SpssClient.StopClient() clause. When spss API tries to open the dataset I constantly get license error and can't find any reason why. I use network license for 28.0.1.0 (142). I'm 100% sure that this error is not caused by too many users connected at once. Standalone application works fine - no license errors. This is my code below:

    import spss
    import spssaux
    import SpssClient

    # # # turning off logging
    spss.SetOutput("off")

    # # # getting data file path
    SpssClient.StartClient()
    active_data_doc = SpssClient.GetActiveDataDoc()
    sav_file_path = active_data_doc.GetDocumentPath()
    SpssClient.StopClient()

    # # # opening file - here I get license error
    spssaux.OpenDataFile(sav_file_path)
    I would appreciate any help.​

    ------------------------------
    Konrad Gałuszko
    ------------------------------


  • 2.  RE: Python SPSS - constant problems with license

    Posted Mon September 26, 2022 09:45 AM
    Hello Konrad,

    Thanks for your note. This appears to be a problem with network licensing when running automation calls. We have filed defect #6292 for this issue and will have Statistics Support create a known issue and the engineering team will look at the problem.

    Regards,
    Curtis Browning


    ------------------------------
    Curtis Browning
    SPSS Statistics Architect
    ------------------------------