Bug 814 - OpenEV Startup Error - gnuplot and paths with spaces
: OpenEV Startup Error - gnuplot and paths with spaces
Status: RESOLVED FIXED
: FWTools
FWTools (win32)
: unspecified
: PC Windows NT
: P2 normal
: ---
Assigned To:
:
:
:
:
:
  Show dependency treegraph
 
Reported: 2004-11-04 09:44 by
Modified: 2005-02-10 15:26 (History)


Attachments


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2004-11-04 09:44:35
Frank,

I like your use of an installation frontend...will make it more comfortable
for the rest of us.

I did notice an error when starting OpenEV from the desktop icon:

Loading tools from F:\Program Files\FWTools0.9.2\tools\gvrastertools.py
'F:\Program' is not recognized as an internal or external command, operable
program or batch file.
ERROR 4: `F:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\OBJ_2.png' does not exist in
the file system, and is not recognised as a supported dataset name.
... failed to load ... skipping.
Loading tools from F:\Program Files\FWTools0.9.2\tools\open_raw.py


HTH

Gerald
------- Comment #1 From 2004-11-04 09:46:00 -------
I believe this is a problem with how we invoke GNUplot with paths that
have spaces in them.  I notice that this only occurs with such paths to
the FWTools directory, and that the histogram tool is not in the menu in
this circumstace.  The OBJ_2.png thing is a temporary file that is supposed
to be created by gnuplot. 

I will dig into this.  Likely requires a change to the core OpenEV. 
------- Comment #2 From 2004-11-04 10:25:33 -------
Frank, there is a python-callable function exposed through _gv called
get_short_path_name.  On windows, this calls the appropriate win32 api function
to retrieve the dos 8.3 compatible path.  On linux, it simply returns the
requested name.  There is a small problem with the API that it requires the path
to exist, so if you are trying to calculate the path to a file which does not
yet exist, you should just get the short path name of the directory in which it
is to be created.  I created a small wrapper function in cietmap to avoid this
error:

def get_short_path_name(path):
    """
    return a DOS 8.3 compatible name
    """
    #TODO: try splitting the path and resolving 
    #the short path of as much of the path as possible
    if not os.path.exists( path ):
        return path 
    return _gv.gv_short_path_name(path)
------- Comment #3 From 2005-02-10 15:26:07 -------
I have changed the installer to use the short form of the directory name
and this seems to solve the problem of loading intalled tools.  It is
possible there is still an issue with user supplied tools in a directory 
with spaces in it.  If this comes up, we can revisit the problem.