Mon 11 Jan 2016 10:40:30 PM UTC, comment #8:
The original reported issue here can be CLOSED. FIXED I guess as I added a warning to sysoneline: https://github.com/cbm755/octsympy/commit/f1e62d294071ad0c1915aa38816c348e3a0c659c
Re: the later discussion: perhaps this is related to your other issue about cp1252 and utf-8 (#46771).
|
Sun 10 Jan 2016 01:22:52 PM UTC, comment #7:
I uninstalled Python 3.5.1 and Installed Enthought Canopy Python 2.7.10. Now I have no problem about longer lines. I think I continue using this older version as it has less development issues.
Thank You for your help!
|
Sun 10 Jan 2016 09:28:52 AM UTC, comment #6:
Following similar test, setup 'sympref ipc default':
In Octave:
/
>>cmd="f=open('aeiouybbb123.txt','w');f.write('123testing');f.close();return 1"
>> x = 10; y = 2;
>> [a, b] = python_cmd (cmd, x, y)
(timeout)
/
shows Python never did the file aeiouybbb123.txt.
I think this tells that Python never got the input command line or is unable to execute it or is not told to execute it.
Maybe a missing newline? EOF? Problem with Windows 10 io-streams? Or something similar?
|
Sun 10 Jan 2016 08:48:48 AM UTC, comment #5:
Tested input variables to python_ipc_driver -call from python_cmd line 138:
/
>> pkg load symbolic
>> sympref display flat
>> sympref ipc default
Resetting the octsympy communication mechanism
Choosing the default [autodetect] octsympy communication mechanism
>> x = 10; y = 2;
>> cmd = '(x,y) = _ins; return (x+y,x-y)';
>> [a, b] = python_cmd (cmd, x, y)
// in Python_cmd calling python_ipc_driver:
cmd:
{
[1,1] = def _fcn(_ins):
[1,2] = _outs = []
[1,3] = (x,y) = _ins; return (x+y,x-y)
[1,4] = return _outs
[1,5] = _outs = _fcn(_ins)
}
varargin:
{
[1,1] = 10
[1,2] = 2
}
//endof ipcdriver call
/
then (timeout) from readblock. Does this look ok?
|
Sat 09 Jan 2016 08:40:38 PM UTC, comment #4:
The winwrapy.bat -file calls python.exe:
python.exe -i 2> myoutfile.txt
I added the myoutfile.txt (instead of NUL) to see the output. It was (for Octave input: x=symx('x')):
/
Python 3.5.1 (v3.5.1:37a07cee5969, Dec 6 2015, 01:38:48) [MSC v.1900 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> >>>
/
also everything looks as expected this far. Then after a while a call to readblock returns a timeout error.
|
Sat 09 Jan 2016 07:45:17 PM UTC, comment #3:
Also for a single symbol definition:
/
>> x=sym('x')
OctSymPy v2.2.4: this is free software without warranty, see source.
Initializing communication with SymPy using a popen2() pipe.
Detected Windows: using "winwrapy.bat" to workaround Octave bug #43036
Some output from the Python subprocess (pid 15312) might appear next.
Technical details: fin = 4, fout = 3, pid = 15312.
Waiting......................warning: readblock: timeout of 30 exceeded, breaking out
warning: called from
readblock at line 83 column 7
python_ipc_popen2 at line 77 column 14
python_ipc_driver at line 30 column 13
python_cmd at line 138 column 9
sym at line 361 column 5
no output so far
err:
1
out:
\nFAILED TIMEOUT\n
error: ipc_popen2: something wrong? timed out starting python
error: called from
python_ipc_popen2 at line 79 column 7
python_ipc_driver at line 30 column 13
python_cmd at line 138 column 9
sym at line 361 column 5
>>
/
What other information I can find for you? Variables err and out were displayed when calling readblock. Other things are not so easy to test as symbols are not available. Maybe some debug printing?
The error is the same independent of whether python console is running at the same time, as expected I suppose.
Is there a minimum memory limit using python in this? Or is my installation (Windows, octave, python, sympy) lacking something? Should I have all other packages also installed?
|
Fri 08 Jan 2016 12:59:47 PM UTC, comment #2:
Following test result:
/
>> pkg load symbolic
>> sympref display flat
>> sympref IPC default
Resetting the octsympy communication mechanism
Choosing the default [autodetect] octsympy communication mechanism
>> syms x y
OctSymPy v2.2.4: this is free software without warranty, see source.
Initializing communication with SymPy using a popen2() pipe.
Detected Windows: using "winwrapy.bat" to workaround Octave bug #43036
Some output from the Python subprocess (pid 6276) might appear next.
Waiting......................warning: readblock: timeout of 30 exceeded, breaking out
warning: called from
readblock at line 83 column 7
python_ipc_popen2 at line 77 column 14
python_ipc_driver at line 30 column 13
python_cmd at line 138 column 9
sym at line 361 column 5
syms at line 158 column 9
no output so far
error: ipc_popen2: something wrong? timed out starting python
error: called from
python_ipc_popen2 at line 79 column 7
python_ipc_driver at line 30 column 13
python_cmd at line 138 column 9
sym at line 361 column 5
syms at line 158 column 9
error: evaluating argument list element number 3
error: called from
syms at line 158 column 9
>>
/
There is something wrong since I can no longed define symbols.
Things seem to be normal when I don't use
>>sympref IPC default
but instead
>>sympref IPC system
but this really gives me the 'line too long' -error.
|
Thu 07 Jan 2016 06:36:46 PM UTC, comment #1:
This works for me on GNU/Linux. I expect it works on Windows too with `sympref ipc default` (i.e., popen2). Can you confirm?
Problem is ipc_sysoneline is limited to about 8000 characters. And the long k expression must be passed on the command line to Python. => <= !
|
Thu 07 Jan 2016 12:00:46 PM UTC, original submission:
Test to substitute x=0 to an expression:
/
>> syms x
>> k=int(sin(x)^200,x)
(lines of k)
>> subs(k,x,0)
The command line is too long.
status = 127
out =
error: system() call failed!
error: called from
python_ipc_sysoneline at line 92 column 5
python_ipc_driver at line 34 column 15
python_cmd at line 138 column 9
subs at line 117 column 7
>>
/
However, testing this in Python/SymPy returns 0 as expected.
In this expression 'x' is one character and expression k is handled and shown properly. As also '0' is one character one would expect same length expression after subs, possibly simplified.
Versions:
Python 3.5.1, Sympy 0.7.6.1, Windows 10. Symbolic 2.2.4
|