python problems with gps routes

Posted by: kswish0

python problems with gps routes - 16/07/2004 19:47

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.
Posted by: drakino

Re: python problems with gps routes - 16/07/2004 20:04

Try:

./parse_mapsonus.py filename.html
Posted by: kswish0

Re: python problems with gps routes - 16/07/2004 20:09

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?
Posted by: tfabris

Re: python problems with gps routes - 16/07/2004 20:28

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
Posted by: drakino

Re: python problems with gps routes - 16/07/2004 20:29

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).
Posted by: kswish0

Re: python problems with gps routes - 29/07/2004 20:03

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?
Posted by: tfabris

Re: python problems with gps routes - 29/07/2004 20:31

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.
Posted by: kswish0

Re: python problems with gps routes - 30/07/2004 03:23

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.
Posted by: tfabris

Re: python problems with gps routes - 30/07/2004 13:08

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.