I am running a python script that opens a simple CSV file and pulls data from two columns, like:
ABC 6
DEF 7
GHI 12
Running my script with these values works as expected. But when I change the CSV file to include decimals, the script doesn't execute:
ABC 6.5
DEF 7
GHI 12.2
The output window instantly closes and terminates at this point in the code:
for row in csv_f:
weight = long(row[1])
print row[0], weight, weight * NAV / 100
I tried replacing long with 'float' and that doesn't work either. Any ideas on why this is occurring and how to fix it?