Error: 'method_descriptor' object is unsubscriptable
Posted: Tue Oct 02, 2018 11:55 am
I'm running into the following error in this automation. The error has to do with the method call to the generic GetVersion() method on the IRateSchedules service. Any idea what I'm doing wrong with this generic method call?
Error: 'method_descriptor' object is unsubscriptable
Error: 'method_descriptor' object is unsubscriptable
Code: Select all
import clr
import System
clr.ImportExtensions(System.Linq)
from SoftPro.OrderTracking.Client.Rates import IMunicipalTaxStampsFeeScheduleVersion, IRateSchedules
clr.AddReference('SoftPro.OrderTracking.Client')
from SoftPro.OrderTracking.Client.Orders import IOrderItem
order = Context
rateSchedules = order.GetService(IRateSchedules)
municipalScheduleDefault = IRateSchedules.MunicipalTaxStampsFeeSchedules.GetValue(rateSchedules).Where(lambda s: s.Enabled == True and s.Name == 'Test Fee Schedule').FirstOrDefault()
municipalScheduleCurrentVersionDefault = IRateSchedules.GetVersion[IMunicipalTaxStampsFeeScheduleVersion](rateSchedules, municipalScheduleDefault.CurrentVersionID) # error at this line
order.Project = municipalScheduleCurrentVersionDefault.ID.Guid.ToString()
# Other code