W
W. eWatson
Here's an traceback error msg I get.
Exception in Tkinter callback
Traceback (most recent call last):
File "C:\Python25\lib\lib-tk\Tkinter.py", line 1403, in __call__
return self.func(*args)
File
"C:\Sandia_Meteors\Sentinel_Development\Development_Sentuser+Utilities\sentuser\sentuser_20090103+hist.py",
line 467, in ShowHistogram
mean = sum(hist)
TypeError: 'float' object is not callable
for the code:
----------------------
sum = 0.0
avg = 0.0
nplt_bins = 32
for i in range(len(hist)):
# msg = "%5d %6d\n" % (i,hist)
msg = "%5d %6d\n" % (i,hist)
sum = sum + hist
text.insert( END, msg )
for i in range(len(hist)):
avg = avg + (i*hist/sum)
mean = sum(hist) <-------------- faulty line
mean = mean/256.0
-------------------------end
hist is a list of 256 integers. What does float have to do with this?
Exception in Tkinter callback
Traceback (most recent call last):
File "C:\Python25\lib\lib-tk\Tkinter.py", line 1403, in __call__
return self.func(*args)
File
"C:\Sandia_Meteors\Sentinel_Development\Development_Sentuser+Utilities\sentuser\sentuser_20090103+hist.py",
line 467, in ShowHistogram
mean = sum(hist)
TypeError: 'float' object is not callable
for the code:
----------------------
sum = 0.0
avg = 0.0
nplt_bins = 32
for i in range(len(hist)):
# msg = "%5d %6d\n" % (i,hist)
msg = "%5d %6d\n" % (i,hist)
sum = sum + hist
text.insert( END, msg )
for i in range(len(hist)):
avg = avg + (i*hist/sum)
mean = sum(hist) <-------------- faulty line
mean = mean/256.0
-------------------------end
hist is a list of 256 integers. What does float have to do with this?