[execnet-dev] Bug in example

holger krekel holger at merlinux.eu
Thu Nov 28 11:23:32 CET 2013


On Thu, Nov 28, 2013 at 11:02 +0100, cumpuleddu wrote:
> Thanks Holger,
> I thought it was the problem, but even setting the path to jython
> executable I got the error...

Could you tell exactly the line how you specified that path?
You need to be careful with escaping on windows wrt "\" etc.

> Just for test, I tried replacing
> gw = execnet.makegateway("popen//python=jython")
> BY
> gw = execnet.makegateway("popen//python=python")

> Here, python executable is found...

Maybe "python" in on your system wide PATH?
Try typing "python" and "jython" in a cmdline window.

holger

> Alex
> >Hi,
> >
> >On Wed, Nov 27, 2013 at 08:41 +0100, cumpuleddu wrote:
> >>Hello everybody,
> >>I installed execnet on Windows 7.
> >>However, when running this example:
> >>
> >>   gw = execnet.makegateway("popen//python=jython")
> >>     channel = gw.remote_exec("""
> >>         from java.util import Vector
> >>         v = Vector()
> >>         v.add('aaa')
> >>         v.add('bbb')
> >>         for val in v:
> >>             channel.send(val)
> >>     """)
> >>
> >>     for item in channel:
> >>         print (item)
> >>
> >>I got this error:
> >>
> >>Traceback (most recent call last):
> >>   File "F:\Documenti\Mistieru\Programmes\Python\ExecTest\ExecTest\src\exectest.py",
> >>line 20, in <module>
> >>     gw = execnet.makegateway("popen//python=jython")
> >>   File "C:\execnet-1.1\execnet\multi.py", line 88, in makegateway
> >>     io = gateway_io.create_io(spec)
> >>   File "C:\execnet-1.1\execnet\gateway_io.py", line 90, in create_io
> >>     return Popen2IOMaster(args)
> >>   File "C:\execnet-1.1\execnet\gateway_io.py", line 17, in __init__
> >>     self.popen = p = Popen(args, stdin=PIPE, stdout=PIPE)
> >>   File "C:\Users\Lisandru\AppData\Roaming\NetBeans\7.4\jython-2.5.1\Lib\subprocess.py",
> >>line 757, in __init__
> >>     self._execute_child(args, executable, preexec_fn, close_fds,
> >>   File "C:\Users\Lisandru\AppData\Roaming\NetBeans\7.4\jython-2.5.1\Lib\subprocess.py",
> >>line 1271, in _execute_child
> >>     raise OSError(e.getMessage() or e)
> >>OSError: Cannot run program "jython" (in directory
> >>"F:\Documenti\Mistieru\Programmes\Python\ExecTest\ExecTest\src"):
> >>CreateProcess error=2, Le fichier spécifié est introuvable [ie, FILE
> >>NOT FOUND]
> >I think it's because "jython" is not found.  Try specifying
> >the path to the jython executable.
> >
> >cheers,
> >holger
> >
> >>Thanks!
> >>Alex
> >>_______________________________________________
> >>execnet-dev mailing list
> >>execnet-dev at python.org
> >>https://mail.python.org/mailman/listinfo/execnet-dev
> >>
> 


More information about the execnet-dev mailing list