python problem

21 views
Skip to first unread message

Yijun Ding

unread,
Nov 1, 2011, 12:34:15 PM11/1/11
to guess-discuss
Recently have a strange problem:

C:\DOCUME~1\vvijay\LOCALS~1\Temp\scantmp.gdf created
py loading: g.makeFromGDF('C:\DOCUME~1\vvijay\LOCALS~1\Temp
\scantmp.gdf')
GO error: Traceback (innermost last):
File "<string>", line 1, in ?
java.io.FileNotFoundException: C:\DOCUME~1
vijay\LOCALS~1\Temp\scantmp.gdf (The filename, directory name, or
volume label syntax is incorrect)

This only happen to two persons in our group. The problem is

PythonInterpreter pi =
(PythonInterpreter)Guess.getInterpreter();

pi.exec("g.removeComplete(g.nodes)");
String gdf_script = "g.makeFromGDF('"+fileg+"')";
System.err.println("py loading: "+gdf_script);
pi.exec(gdf_script);

The character after "C:\DOCUME~1\" is changed. I thought it is "\v"
problem. But some "!!" error characters added in other person's case.
Basically the file name problem.

The program works fine when I use different temporary directory name
by

-Djava.io.tmpdir="\Temp\"

on command line.

Yijun Ding

unread,
Nov 1, 2011, 1:04:19 PM11/1/11
to guess-discuss
It seems each time after posting, I find solutions. The file separator
string need to be forward slash instead of back slash when send to
Python.

But why it works on most of computers?
Reply all
Reply to author
Forward
0 new messages