Granta MI - Cross database tabular links error 500 in STK3.2 / MI23R2

Options
VEtique
VEtique Member, Employee Posts: 8
Name Dropper First Anniversary First Comment Ansys Employee
edited October 2023 in Materials

The scripting toolkit 3.2 documentation says cross database links are supported. But the last line in this code fails with the error. Can you take a look? I am on MI 23R2 and STK 3.2.

Browse.GetAttributeDetails failed with code 500 and message: Tabular attribute xxx has cross database data. This interface version does not support this.

from GRANTA_MIScriptingToolkit import granta
import os

# if __name__ == "__main__":
client = granta.connect("https://servername/mi_servicelayer", user_name=<>, password=<>)
db = client.get_db("My Database")
table = db.get_table("Metals")
records = table.all_records()

Best Answer

  • VEtique
    VEtique Member, Employee Posts: 8
    Name Dropper First Anniversary First Comment Ansys Employee
    Answer ✓
    Options

    Reinstalling the STK properly in the virtual environment solved the issue. That way, there is no conflict with previous STK versions.
    Thanks for the support!

Answers

  • Doug Addy
    Doug Addy Member, Employee Posts: 21
    First Anniversary Name Dropper First Answer Ansys Employee
    Options

    Scripting Toolkit version 3.2 should be targetting the 22/04 MI Service Layer Version. This supports cross-database tabular data.

    Can you verify that an errant older version of the STK hasn't been included in your path by adding the following into your script?

    import GRANTA_MIScriptingToolkit as gdl
    print(gdl.__version__)
    
  • VEtique
    VEtique Member, Employee Posts: 8
    Name Dropper First Anniversary First Comment Ansys Employee
    Options

    Thank you!
    I will do the test. If it is not the good version, how to change it?

  • VEtique
    VEtique Member, Employee Posts: 8
    Name Dropper First Anniversary First Comment Ansys Employee
    Options

    Version is: 3.1.338