[IPOL discuss] question about run_algo

Juan Cardelino juan.cardelino at gmail.com
Wed Dec 8 12:10:33 CET 2010


I've created one demo and make it run succesfully, however since
yesterday I'm having some problems to run my 2nd demo. I'm getting a
file not found error, but I can' tell if the problem is to find the
executable or the log file. I have a little doubt: the path used by
the demo, contains only the bin/ subdir or the full path of the
system? I've double checked that the executable (qnm) is in place and
runs from the command line. Below is the code of the run_algo function
and the output.
Thanks.

------------- CODE -------------

 def run_algo(self, a, b):
        """
        the core algo runner
        could also be called by a batch processor
        this one needs no parameter
        """
        cherrypy.log("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
	cherrypy.log("START ALGO LOG")
	cherrypy.log("bin_dir: "+self.bin_dir)
	stdout_abs_filename = self.work_dir + self.stdout_rel_name
        stdout_file = open(stdout_abs_filename, 'w')
	cherrypy.log("stdout_file: "+stdout_abs_filename)	
	
	#p0 = self.run_proc(['ls','.'], stdout=stdout_file, stderr=stdout_file)
        #self.wait_proc(p0)

	p1 = self.run_proc(['qmn','main_ms_tree_vec_demo',
str(a),str(1),'input_0.png', 'output.tr', 'init_part.part'],
stdout=stdout_file, stderr=stdout_file)
        #p1 = self.run_proc(['qmn','main_ms_tree_vec_demo',
str(a),str(1),'input_0.png', 'output.tr', 'init_part.part'])   # I
ALSO TRIED THIS ONE TO REMOVE POSSIBLE PROBLEMS WITH THE FILES
        self.wait_proc(p1)

----->>>more code...but this run_proc is the one that fails.

------------- OUTPUT -------------

[08/Dec/2010:08:58:28]  XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
[08/Dec/2010:08:58:28]  START ALGO LOG
[08/Dec/2010:08:58:28]  bin_dir:
/home/juanc/juanc/trabajo/ipol/ipol_demo/app/xxx_ms_partition/bin/
[08/Dec/2010:08:58:28]  stdout_file:
/home/juanc/juanc/trabajo/ipol/ipol_demo/app/xxx_ms_partition/tmp/41596a7892f9b58063c0258911d317a5/stdout.txt


/usr/lib/python2.6/cgitb.py:173: DeprecationWarning:
BaseException.message has been deprecated as of Python 2.6
  value = pydoc.html.repr(getattr(evalue, name))

 /usr/lib/python2.6/subprocess.py in
_execute_child(self=<subprocess.Popen object>, args=['qmn',
'main_ms_tree_vec_demo', '100.0', '1', 'input_0.png', 'output.tr',
'init_part.part'], executable='qmn', preexec_fn=None, close_fds=False,
cwd='/home/juanc/juanc/trabajo/ipol/ipol_demo/app/xxx_ms_partition/tmp/41596a7892f9b58063c0258911d317a5/',
env={'ALL_PROXY': 'socks://httpproxy.fing.edu.uy:3128/', 'COLORTERM':
'gnome-terminal', 'CVSROOT':
':ext:juanc at ampere.fing.edu.uy:/iie/home01/juanc/repositorios/cvs',
'DBUS_SESSION_BUS_ADDRESS':
'unix:abstract=/tmp/dbus-JAp1zUCAmh,guid=3b8862226bf10b6d7610be8800000083',
'DEFAULTS_PATH': '/usr/share/gconf/gnome.default.path',
'DESKTOP_SESSION': 'gnome', 'DICTIONARY': 'castellano', 'DISPLAY':
':0.0', 'DOM': '', 'EDITOR': 'vi', ...}, universal_newlines=False,
startupinfo=None, creationflags=0, shell=False, p2cread=None,
p2cwrite=None, c2pread=None, c2pwrite=5, errread=None, errwrite=5)
 1139                     if fd is not None:
 1140                         os.close(fd)
 1141                 raise child_exception
 1142
 1143
child_exception = OSError(2, 'No such file or directory')
<type 'exceptions.OSError'>: [Errno 2] No such file or directory
      args = (2, 'No such file or directory')
      child_traceback = 'Traceback (most recent call last):\n File
"/usr/...st)\nOSError: [Errno 2] No such file or directory\n'
      errno = 2
      filename = None
      message = ''
      strerror = 'No such file or directory'



More information about the discuss mailing list