wesm/pandas — Issue #472: pandas: python remote engine crashes at object introspection of DataFrame instance Optionen
Author: MaxBo
Created: 2011-12-12 09:38:19+00:00
State: open

Dear all,
When i try the following pandas example code from
http://pandas.sourceforge.net/dsintro.html
in the Python interpreter of PyScripter 2.4.3.0 with python 2.6.7 on
win32bit and the remote python engine (using rpyc Version 3.2.0) and
pandas 0.6.0

from pandas import *
d = {'one' : Series([1., 2., 3.], index=['a', 'b', 'c']), 'two' :
Series([1., 2., 3., 4.], index=['a', 'b', 'c', 'd'])}
df = DataFrame(d)

and try to use the object inspection by typing
df.
in order to get the available methods and attributes of the DataFrame
instance,
the python engine crashes. The same happens, when i open the
"Variables"-Window in PyScripter after having created the df object.
Using the internal python engine of PyScripter causes no crash, but
the object introspection does not worrk neither.
Using the IDLE Python Interpreter, the object inspection works (after
waiting for 2-3 seconds),

With instances of the Series class, i had no problems.

A similar behaviour has been described in
http://code.google.com/p/pyscripter/issues/detail?id=579
the problem descibed there has something to do with the impementation
of the __getattribute__() method.
In the pandas modules only in pandas\core\groupby.py the
__getattribute__ method is changed.

I guess, that the bug is caused by the way, how the IPython completion
mechanism has been implemented in pandas.

>> The columns are also connected to the IPython completion mechanism so they can be tab-completed:
>> In [5]: df.fo
>> df.foo1 df.foo2

As i don't know, if this behaviour is caused by a problem in the
pandas code, or if the remote python engine of PyScripter has a bug, i
will cross-post this bug to the PyScripter mailing list.

Best regards,
Max

Thomas Kluyver wrote:

> Nothing comes to mind. I've read through the linked bug report for
> PyScripter, and it appears that case was due to attributes presenting
> invalid special (double-underscore) attributes, like __class__ and __doc__.
> I don't think that's a problem with the Series objects we're returning.
>
> Wishful thinking perhaps, but I don't suppose PyScripter can be persuaded
> to crash with a traceback? Otherwise, we're kind of debugging blind.
>
> Thanks,
> Thomas