I have the following code:
#!/usr/bin/env python
from suds.client import Client
import time
import json
class ClassName(object):
fecha = time.strftime('%Y-%m-%d')
def trm(self, fecha):
try:
wsdl_url = 'https://www.superfinanciera.gov.co/SuperfinancieraWebServiceTRM/TCRMServicesWebService/TCRMServicesWebService?WSDL'
client = Client(wsdl_url, location=wsdl_url, faults=True)
trm = client.service.queryTCRM(fecha)
response = json.dumps(trm.value)
rate = float(response)
except Exception as e:
return str(e)
return rate
print trm('rate')
print type(trm('rate'))
the result is:
TypeError: trm() takes exactly 2 arguments (1 given)