Python Forum
[SOLVED] Requiring help running an old Python script (non Python savvy user)
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[SOLVED] Requiring help running an old Python script (non Python savvy user)
#12
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:
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
Reply


Messages In This Thread
RE: Requiring help running an old Python script (non Python savvy user) - by Miletkir - Jan-16-2021, 07:18 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Trying to generating multiple json files using python script dzgn989 4 130 5 hours ago
Last Post: deanhystad
  Problems passing arguments containing spaces to bash script and then on to python kaustin 6 483 Apr-03-2024, 08:26 PM
Last Post: deanhystad
  ChromeDriver breaking Python script genericusername12414 1 359 Mar-14-2024, 09:39 AM
Last Post: snippsat
  using PowerShell from Python script for mounting shares tester_V 8 600 Mar-12-2024, 06:26 PM
Last Post: tester_V
  No Internet connection when running a Python script basil_555 8 730 Mar-11-2024, 11:02 AM
Last Post: snippsat
Question Running Python script through Task Scheduler? Winfried 8 634 Mar-10-2024, 07:24 PM
Last Post: Winfried
  Is possible to run the python command to call python script on linux? cuten222 6 821 Jan-30-2024, 09:05 PM
Last Post: DeaD_EyE
  run SQL without user intervention python dawid294 0 250 Jan-19-2024, 01:11 PM
Last Post: dawid294
  python script is hanging while calling a procedure in database prasanthi417 4 595 Jan-17-2024, 02:33 PM
Last Post: deanhystad
  run part of a script with a different version of Python jdog 2 489 Jan-09-2024, 08:49 PM
Last Post: jdog

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020