Jan-16-2021, 07:18 PM
Yeah, I fixed that.
The problem seems to be coming from the conversion. When I use jef's code, the error, as we've seen, is:
The problem seems to be coming from the conversion. When I use jef's code, the error, as we've seen, is:
Error:D:\Milky>python GMLMakerJ.py
** Loading Stars
Traceback (most recent call last):
File "D:\Milky\GMLMakerJ.py", line 637, in <module>
starSystems, boundingBox = LoadStars(starfilePrefix)
File "D:\Milky\GMLMakerJ.py", line 201, in LoadStars
habHYG = int(row[InputFields.HABHYG])
ValueError: invalid literal for int() with base 10: 'a'
When I use 2to3.py, I get instead:Error:D:\Milky>python GMLMaker.py
** Loading Stars
Traceback (most recent call last):
File "D:\Milky\GMLMaker.py", line 638, in <module>
starSystems, boundingBox = LoadStars(starfilePrefix)
File "D:\Milky\GMLMaker.py", line 195, in LoadStars
reader = csv.reader(file(theFileName + ".csv"))
NameError: name 'file' is not defined
In any case, I get this when feeding a csv file to the script:Error:D:\Milky>python GMLMaker.py -L 10 HabHYG50ly.csv
Traceback (most recent call last):
File "D:\Milky\GMLMaker.py", line 607, in <module>
starfilePrefix = starfileName[:-4]
NameError: name 'starfileName' is not defined