bugGNU Octave - Bugs: bug #46847, symbolic package: expand function...

 
 

bug #46847: symbolic package: expand function error

Submitter:  None
Submitted:  Thu 07 Jan 2016 10:54:14 PM UTC
   
 
Category:  Octave Package Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Segfault, Bus Error, etc.
Status:  Duplicate Assigned to:  None
Originator Name:  Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * 4.0.0
Operating System:  * Microsoft Windows Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Sat 09 Apr 2016 04:41:18 AM UTC, comment #8: 

Great!  Now I recognize this as #46771.  I have an idea how to work around by only passing ascii text down the pipe (with utf8 escaped).

Is it possible for you to test the branch I mention in #46771?  https://github.com/cbm755/octsympy/pull/302

I suggest we continue the discussion at #46771 (and mark this a dupe).

Colin Macdonald <cbm>
Sat 09 Apr 2016 02:32:22 AM UTC, comment #7: 

Thanks for the help.  I tried comment #2 and #1 afterwards.  Here is the result:

>> sympref IPC system

Resetting the octsympy communication mechanism
Forcing the system() octsympy communication mechanism

>> syms x y

OctSymPy v2.2.4: this is free software without warranty, see source.
Using system()-based communication with Python [sysoneline].
Warning: this will be SLOW.  Every round-trip involves executing a
new Python process and many operations involve several round-trips.

>> (x-y)*(x-y)^2

ans = (sym)

         3
  (x - y)

>> expand(ans)

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "<string>", line 2, in <module>
  File "<string>", line 158, in octoutput_drv
  File "C:\Anaconda3\lib\encodings\cp1252.py", line 19, in encode
    return codecs.charmap_encode(input,self.errors,encoding_table)[0]
UnicodeEncodeError: 'charmap' codec can't encode character '\u22c5' in position 451: character maps to <undefined>
status =  127
out = <?xml version="1.0" ?>
<output_block>
<item>
<f>1003</f>
<f>PYTHON: successful variable import</f>
</item>
</output_block>

                                                                                                                                          
<output_block>
<item>
<f>9999</f>
<f>
&lt;class 'UnicodeEncodeError'&gt;
</f><f>
'charmap' codec can't encode character '\u22c5' in position 451: character maps to &lt;undefined&gt;
</f>
</item>
</output_block>


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
    expand at line 31 column 5

>>

Nidal K. Bazzi <nbazzi>
Fri 08 Apr 2016 11:06:42 PM UTC, comment #6: 

Also, I've just released version 2.3.0 which hopefully slightly improves error reporting on Windows...  Ideally try comment #2 and then try again with 2.3.0.

Colin Macdonald <cbm>
Fri 08 Apr 2016 05:16:06 PM UTC, comment #5: 

Can you try comment #2?

Mike Miller <mtmiller>
Group Member
Fri 08 Apr 2016 04:45:56 AM UTC, comment #4: 

I am running Octave 4.0.1 on Windows 10 64-bit. I have a similar error.  I tried the same code as stated in comment #1, here is what I get:

﫧>> 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 8176) might appear next.

OctSymPy: Communication established.  SymPy v1.0.
Python 3.5.1 |Anaconda 2.5.0 (64-bit)| (default, Feb 16 2016, 09:49:46) [MSC v.1900 64 bit (AMD64)]

>> (x-y)*(x-y)^2

ans = (sym)

         3
  (x - y)

>> expand(ans)

PYTHON: Error in var export
Resetting the octsympy communication mechanism
Closing the Python pipe...
error: python_cmd: unexpected return
error: called from
    python_cmd at line 144 column 6
    expand at line 31 column 5

>>

Nidal K. Bazzi <nbazzi>
Fri 26 Feb 2016 06:40:06 AM UTC, comment #3: 

No response to request for further testing, closing report.

Mike Miller <mtmiller>
Group Member
Fri 08 Jan 2016 01:11:13 AM UTC, comment #2: 

Please test again with "sympref IPC system" so we can see the error

Colin Macdonald <cbm>
Fri 08 Jan 2016 12:26:05 AM UTC, comment #1: 

It works for me on Ubuntu 15.10

syms x y

>>  (x - y)*(x - y)^2

ans = (sym)

         3
  (x - y)

>> expand(ans)

ans = (sym)

   3      2          2    3
  x  - 3⋅x ⋅y + 3⋅x⋅y  - y



Doug Stewart <dastew>
Thu 07 Jan 2016 10:54:14 PM UTC, original submission:  

This code doesn't work:

>> syms x y

OctSymPy v2.2.2: 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 16720) might appear next.

OctSymPy: Communication established.  SymPy v0.7.6.
Python 3.4.3 (v3.4.3:9b73f1c3e601, Feb 24 2015, 22:44:40) [MSC v.1600 64 b
it (AMD64)]

>> (x - y)*(x - y)^2

ans = (sym)

         3
  (x - y)

>> expand(ans)

PYTHON: Error in var export
Resetting the octsympy communication mechanism
Closing the Python pipe...
error: python_cmd: unexpected return
error: called from
    python_cmd at line 143 column 6
    expand at line 31 column 5


Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Digest:
   bug dependencies.

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by nbazzi (Posted a comment)
  • -email is unavailable- added by mtmiller (Posted a comment)
  • -email is unavailable- added by jwe (Updated the item)
  • -email is unavailable- added by siko1056 (Updated the item)
  • -email is unavailable- added by cbm (Posted a comment)
  • -email is unavailable- added by dastew (Posted a comment)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 9 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-04-20 mtmiller StatusWorks For Me Duplicate
        Open/ClosedOpen Closed
        Dependencies- Depends on bugs #46771
    2016-04-08 mtmiller Summaryexpand function error symbolic package: expand function error
    2016-04-08 mtmiller Open/ClosedClosed Open
    2016-02-26 mtmiller StatusNeed Info Works For Me
        Open/ClosedOpen Closed
    2016-01-08 jwe CategoryNone Octave Package
    2016-01-08 siko1056 StatusNone Need Info

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code