Given below is the code that I am using to read values form a file
import linecache
line_number=line_number+1
linecache.getline("write.txt", line_number)
I am using py2exe to convert the file into an executable. The problem is after conversion to exe it cannot read the file.
The error message is: Could not convert string to a float
As suggested in the comment the full error trace is:
Traceback (most recent call last):
File "logic.py", line 437, in <module>
File "logic.py", line 224, in readdata
ValueError: could not convert string to float:
Where am I going wrong?