问题是这一行:
tups.append("GO", datasetlink)
将其更改为:
tups.append(datasetlink)
Process
在一个
try
def Process(datasetlinks):
try:
calc = Calculator();
tups = calc.calculate(datasetlinks)
except:
print(sys.exc_info()[0])
return tups;
这给了我
<type 'exceptions.NameError'>
当我移动try块进行计算时:
def calculate(self, links):
try:
print("LENGHT:", len(links)) # 48
tups=[]
for datasetlink in links:
print(datasetlink)
tups.append("GO", datasetlink)
except:
print(sys.exc_info()[0])
return tups
相反,我得到了
<type 'exceptions.TypeError'>