Oct-10-2016, 10:36 PM
(This post was last modified: Oct-10-2016, 10:47 PM by kentman234.)
(Oct-10-2016, 10:31 PM)metulburr Wrote:(Oct-10-2016, 10:24 PM)kentman234 Wrote:self.datayf.append(float(y.strip().replace(',', '')))
Remove all text formatting before putting it in python tags. Select the text, and there is a button with an "A" with a minus symbol. You need to do this for code within python tags.
So then it will be
self.datayf.append(float(y.strip().replace(',', '')))
OK, I try now:
print(y.strip().replace(',', ''))
(Oct-10-2016, 10:32 PM)Yoriz Wrote: The idea is that you see what the output of the print line was.
If that is an empty string it is not possible for float to turn that into a number, so you need to decide if it should of been possible to be an empty string or if you need to deal with the exception caused by there being an empty string.
So I think that our discussion has finished right? Because now I need to deal with the code itself.