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)
#6
Thanks mate, appreciated.

Checking the module with IDLE, it doesn't stop at invalid syntax and opens the Python shell, which I suppose is a good sign. However, I'm still stuck at launching the script.
GMLMaker.py -L 10 filename.csv doesn't work. It still stops at "10" being invalid syntax. What does "-L 10" in the command define?

If I just run the module via IDLE, I get:
Error:
========================= RESTART: D:\Milky\GMLMaker.py ======================== ** Loading Stars Traceback (most recent call last): File "D:\Milky\GMLMaker.py", line 637, in <module> starSystems, boundingBox = LoadStars(starfilePrefix) File "D:\Milky\GMLMaker.py", line 201, in LoadStars habHYG = int(row[InputFields.HABHYG]) ValueError: invalid literal for int() with base 10: 'a'
If you don't mind downloading a .csv, here's a sample input file. The output GML file should look like this.

EDIT: Alright, so "-L 10" refer to options define at the end of the script. So, like other languages, I suppose that default is assumed if I skip them. Somehow, it works better using the windows command prompt, I get:
Error:
D:\Milky>GMLMaker.py HabHYG50ly.csv Traceback (most recent call last): File "D:\Milky\GMLMaker.py", line 606, in <module> starfilePrefix = starfileName[:-4] NameError: name 'starfileName' is not defined
So this must be a basic problem of my input file not being read... Or maybe it's not read because of the issue mentioned above?
Reply


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

Possibly Related Threads…
Thread Author Replies Views Last Post
  Trying to generating multiple json files using python script dzgn989 4 204 May-10-2024, 03:09 PM
Last Post: deanhystad
  Problems passing arguments containing spaces to bash script and then on to python kaustin 6 498 Apr-03-2024, 08:26 PM
Last Post: deanhystad
  ChromeDriver breaking Python script genericusername12414 1 361 Mar-14-2024, 09:39 AM
Last Post: snippsat
  using PowerShell from Python script for mounting shares tester_V 8 610 Mar-12-2024, 06:26 PM
Last Post: tester_V
  No Internet connection when running a Python script basil_555 8 738 Mar-11-2024, 11:02 AM
Last Post: snippsat
Question Running Python script through Task Scheduler? Winfried 8 647 Mar-10-2024, 07:24 PM
Last Post: Winfried
  Is possible to run the python command to call python script on linux? cuten222 6 828 Jan-30-2024, 09:05 PM
Last Post: DeaD_EyE
  run SQL without user intervention python dawid294 0 259 Jan-19-2024, 01:11 PM
Last Post: dawid294
  python script is hanging while calling a procedure in database prasanthi417 4 603 Jan-17-2024, 02:33 PM
Last Post: deanhystad
  run part of a script with a different version of Python jdog 2 496 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