Hey Jon!
You shouldn’t need to use the sgtk_from_entity
you can just use self.sgtk.shotgun
to get the API instance.
Beyond that, you need to make sure that the environment it picks, contains the tk-shotgun
engine in it, and that the entity type allows PublishedFile
being linked in Shotgun, other wise it will fall back to the legacy method.