Unoffical empeg BBS

Quick Links: Empeg FAQ | RioCar.Org | Hijack | BigDisk Builder | jEmplode | emphatic
Repairs: Repairs

Topic Options
#227629 - 16/07/2004 19:47 python problems with gps routes
kswish0
enthusiast

Registered: 06/02/2002
Posts: 212
Loc: Virginia, USA
I've made gps routes before using the python script but for some reason, its not working for me now. From a command prompt, I'm typing "parse_mapsonus.py filename.html". I'm getting an error saything that there is no such file or directory. The files are in the same folder as the python script stuff and i'm certain that I'm typing the names correctly. So why is it doing this? Hopefully I can get some help quickly because I'm leaving on my trip very soon.

Top
#227630 - 16/07/2004 20:04 Re: python problems with gps routes [Re: kswish0]
drakino
carpal tunnel

Registered: 08/06/1999
Posts: 7868
Try:

./parse_mapsonus.py filename.html

Top
#227631 - 16/07/2004 20:09 Re: python problems with gps routes [Re: drakino]
kswish0
enthusiast

Registered: 06/02/2002
Posts: 212
Loc: Virginia, USA
Thats not working either. When I try that, it says that '.' is not recognized as an internal or external command, operable program or batch file. Any other ideas?

Top
#227632 - 16/07/2004 20:28 Re: python problems with gps routes [Re: kswish0]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31600
Loc: Seattle, WA
You're windows, so you need to have activePython installed on that PC.

Then you need to run activepython with the parameters like so (assuming a few locations, please edit this to match YOUR folders, for instance my activePython is installed in c:\python22 yours might not be:

C:\Python22\python.exe C:\Directions\parse_mapsonus.py C:\temp\myroute.htm
_________________________
Tony Fabris

Top
#227633 - 16/07/2004 20:29 Re: python problems with gps routes [Re: kswish0]
drakino
carpal tunnel

Registered: 08/06/1999
Posts: 7868
I'm guressing by that error you are on Windows, and I won't be much help. Back when I did use Windows for empeg stuff, I still sent the maps to my Linux server to convert. Now I can just do it on my own machine (OS X).

Top
#227634 - 29/07/2004 20:03 Re: python problems with gps routes [Re: tfabris]
kswish0
enthusiast

Registered: 06/02/2002
Posts: 212
Loc: Virginia, USA
Typing it in with the different folders but modified for my own folders, it still didn't work. Am I just supposed to type it in like you said there, all in one line?

Top
#227635 - 29/07/2004 20:31 Re: python problems with gps routes [Re: kswish0]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31600
Loc: Seattle, WA
If any of your folders or file names contain spaces, then you need to convert to short file names, or perhaps surround them with quotes.

For instance, if your ActivePython is installed to "C:\program files\python\", and your parse_mapsonus.py is in "c:\program files\map parser\", and the HTM file was in "C:\My Documents\", then the line would be:

C:\progra~1\Python\python.exe C:\progra~1\mappar~1\parse_mapsonus.py C:\mydocu~1\myroute.htm

The other trick is you have to make sure the spaces are in the correct places.
_________________________
Tony Fabris

Top
#227636 - 30/07/2004 03:23 Re: python problems with gps routes [Re: tfabris]
kswish0
enthusiast

Registered: 06/02/2002
Posts: 212
Loc: Virginia, USA
I just made sure that nothig was in a folder with spaces and when I try, I'm still getting the same error. The system cannot find the path specified.

Top
#227637 - 30/07/2004 13:08 Re: python problems with gps routes [Re: kswish0]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31600
Loc: Seattle, WA
Quote:
The system cannot find the path specified.

Then one of those paths or file names is still wrong.

Take each and every one of those paths and DIR them at the DOS prompt. For instance...

DIR C:\progra~1\Python\python.exe
DIR C:\progra~1\mappar~1\parse_mapsonus.py
DIR C:\mydocu~1\myroute.htm

They should all show a valid directory entry. If any one of them displays an error, that's your problem, you've typed the path or the file name wrong.

And by the way, if your copy of Python.exe was originally installed to a directory with spaces, and you renamed that directory to a non-spaces name without actually deinstalling and reinstalling it, I'm not certain whether it would work or not. Some programs need to stay in the place where you installed them, you can't move them after they have been installed. Not sure if the python interpreter falls under this category or not.
_________________________
Tony Fabris

Top