Strange Error: SystemError: NULL result without error in PyObject_Call

397 views
Skip to first unread message

julius

unread,
Dec 10, 2007, 8:01:26 AM12/10/07
to sympy
Hi All!

I got a strange error which looks to me more like a problem of python
itself than of sympy. Before i report it i first want to post it
anyhow here, just in case somebody has seen it already (still i could
not found it in the discussions..). I also could not find it among to
python bugs, but I have no experience there.

It is an 'SystemError', which comes up when trying to match. I am
wiórking on XP propfessional, here is the session; i found is
yesterday on 0.5.7, also upgrading to 0.5.8 did not change anything; i
leave also my typos in there..:
----------------------------------------------------------------------------------------------------------------------
Python 2.5 (r25:51908, Sep 19 2006, 09:52:17) [MSC v.1310 32 bit
(Intel)] on win32
Type "copyright", "credits" or "license()" for more information.

****************************************************************
Personal firewall software may warn about the connection IDLE
makes to its subprocess using this computer's internal loopback
interface. This connection is not visible on any external
interface and no data is sent to or received from the Internet.
****************************************************************

IDLE 1.2
>>> from sympy import *
>>> sympy

Traceback (most recent call last):
File "<pyshell#1>", line 1, in <module>
sympy
NameError: name 'sympy' is not defined
>>> x,y =symbols('xy')
>>> p=Wild('p')
>>> q=Wild('q')
>>> w=WildFunction('w',nofargs='1')
>>>
KeyboardInterrupt
>>> ex=x**3*sin(y)
>>> ex.match(p**q*w)

Traceback (most recent call last):
File "<pyshell#7>", line 1, in <module>
ex.match(p**q*w)
SystemError: NULL result without error in PyObject_Call
>>> help(SystemError)
Help on class SystemError in module exceptions:

class SystemError(StandardError)
| Internal error in the Python interpreter.
|
| Please report this to the Python maintainer, along with the
traceback,
| the Python version, and the hardware/OS platform and version.
|

(..)

Ondrej Certik

unread,
Dec 10, 2007, 8:06:30 AM12/10/07
to sy...@googlegroups.com

Thanks very much for reporting this bug. This is what I get on Debian:

ondra@fuji:~/sympy$ python
Python 2.4.4 (#2, Aug 16 2007, 02:03:40)
[GCC 4.1.3 20070812 (prerelease) (Debian 4.1.2-15)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from sympy import *
>>> x, y = symbols("xy")
>>> p = Wild("p")
>>> q = Wild("q")


>>> w=WildFunction('w',nofargs='1')
>>>

>>> ex=x**3*sin(y)
>>> ex.match(p**q*w)
{Traceback (most recent call last):

File "<stdin>", line 1, in ?
File "sympy/core/basic_methods.py", line 335, in __repr__
return self.tostr()
File "sympy/core/function.py", line 377, in tostr
return self.name + '_'
File "sympy/core/basic_methods.py", line 267, in __getattr__
raise AttributeError("'%s' object has no attribute '%s'"%
AttributeError: 'WildFunction' object has no attribute 'name'

So clearly there is a bug in sympy, I'll try to fix it in the evening.
As to your SystemError, that I think is a bug in Python.

Ondrej

Ondrej Certik

unread,
Dec 11, 2007, 2:14:25 PM12/11/07
to sy...@googlegroups.com

I created an issue for that:

http://code.google.com/p/sympy/issues/detail?id=487

you can watch progress on this problem. It works in isympy for me, but
it doesn't work in python. That's weird.

Ondrej

Reply all
Reply to author
Forward
0 new messages