Hi,
In my python code, I would like to initialize tank from a project id:
import tank
tank.api.tank_from_entity('Project', myId)
and this works if the tank module I am importing on the first line is associate with this project. However, I do not know anything about the project except its id, so I am forced to use the tank module from generic ( non-project ) studio site config. Which is fine, except that gives me an error:
raise TankError("The pipeline configuration in '%s' is is associated with a different "
"project from %s %s. To see which pipeline configurations are available "
"for a project, open the pipeline configurations page "
"in Shotgun." % (config_context_path, entity_type, entity_id))
This puts me in catch-22: to initialize tank from project, I must first import tank, but to import tank, I must first initialize from project ( to find out which tank to import ).
How would you resolve this situation? My goal is simple: given project id, I want to initialize tank from it.