From: Vitor S. C. <vs...@gm...> - 2017-03-27 09:16:18
|
Hi Gokhan You probably are using a 32 bit version of YAP. Have you tried 64 bit or compiling with libGMP? Your bug seems to be caused by this. Best Vitor On Mon, Mar 27, 2017 at 9:40 AM, Gökhan Solak <so...@it...> wrote: > Hello, > > I want to run a python process from my prolog script (YAP-6.2.2) and read > its output formatted as a list of integers, e.g. [1,2,3,4,5,6]. > > This is what I do: > > :- use_module(library(process)). > > :- process_create(path(python3), > ['my_script.py'], > [stdout(pipe(Out))]), > read(Out, OutputList), > close(Out). > > However, it fails at read/2 predicate with the error: > > PL_unify_term: PL_int64 not supported > Exception ignored in: <_io.TextIOWrapper name='<stdout>' mode='w' > encoding='UTF-8'> > BrokenPipeError: [Errno 32] Broken pipe > > I am sure that I can run the process correctly because with [stdout(std)] > parameter given to process_create the program outputs [1,2,3,4,5,6] as > expected. > > Weird thing is that when I change the process to output some constant_term > it still gives the same PL_int64 error. Appending a dot to the process' > output ([1,2,3,4,5,6].) doesn't solve the error. Using read_term/3 gives the > same error. > > How can I solve this problem? > > This question is also asked here. > > Thanks in advance, > Gökhan Solak > > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Yap-users mailing list > Yap...@li... > https://lists.sourceforge.net/lists/listinfo/yap-users > |