Granta MI - Cross database tabular links error 500 in STK3.2 / MI23R2
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
-
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!3
Answers
-
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__)
1 -
Thank you!
I will do the test. If it is not the good version, how to change it?0 -
Version is: 3.1.338
0