@mgoetsch
so i was having this problem as well i found a fix. not sure if it is the most elegant of fixes but it works.
so within your events/Shotgun folder in your repo openthe ShotgunUtils.py file.
go to line 90 and replace the function GetShotgunForEventPlugin
with the Fallowing code.
any changes i made have been marked with DML EDIT
def GetShotgunForEventPlugin( url, proxy, config ):
# type: (str, Optional[bytes], PluginConfig) -> Shotgun
if LoginInfo.ShotgunInstance:
try:
# DML EDIT check if the current shotgrid can connect
LoginInfo.ShotgunInstance.find_one("Project",filters=[])
# DML EDIT if so then there is a good connection
return LoginInfo.ShotgunInstance
except:
# DML EDIT if not then we force it to connect again
pass
name = SafeEncode( config.GetConfigEntry( 'ShotgunScriptName' ) )
dataController = DeadlineApplicationManager.GetBaseInstance().DataController
secretsManagementEnabled = dataController.SecretsManagementEnabled
if secretsManagementEnabled:
key = SafeEncode( dataController.SecretsManagementController.GetSecret('/events/Shotgun/ShotgunScriptKey') )
else:
key = SafeEncode( config.GetConfigEntry( 'ShotgunScriptKey' ) )
if proxy == b"":
proxy = None
#sgObject = shotgun_api3.shotgun.Shotgun( url, name, key, True, proxy, connect=False )
# DML EDIT convert the name and key into put strings instead of bitcode strings
sgObject = shotgun_api3.shotgun.Shotgun( url, name.decode("utf-8"), key.decode("utf-8"), True, proxy, connect=False )
LoginInfo.Debug( "Connected to Shotgun using API key" )
return sgObject
how this helps