我正在使用Python 2.6并面临以下异常:
Traceback (most recent call last):
File "ProceraExporter_new.py", line 695, in <module>
sendRecord(dictParseConfig,portList[0])
File "ProceraExporter_new.py", line 610, in sendRecord
dictRecord = proceraGen(dictParseConfig)
File "ProceraExporter_new.py", line 539, in proceraGen
exp = ProceraExporter(dictParseConfig)
File "ProceraExporter_new.py", line 216, in __init__
self.createHeaderToFuncMap()
File "ProceraExporter_new.py", line 234, in createHeaderToFuncMap
self.dictHeaderFuncMap['proceraApn'] = self.radiusCalledStationIdGenerator()
File "ProceraExporter_new.py", line 490, in radiusCalledStationIdGenerator
radiusCalledStationId = 'Sushfone-'+str(self.getRandomValue(start = 1, end = 5))
File "ProceraExporter_new.py", line 291, in getRandomValue
randomVal = adder + multiplier*random.randint(start, end)
File "/usr/lib64/python2.6/random.py", line 228, in randint
return self.randrange(a, b+1)
File "/usr/lib64/python2.6/random.py", line 200, in randrange
if width >= maxwidth:
SystemError: Objects/longobject.c:237: bad argument to internal function
从跟踪中可以看出,“start”的值传递为1,“end”传递为5,它们是整数,但它仍然给出了这个异常。
你知道为什么会这样吗?