<div dir="ltr">This problem is still happening, I&#39;ve just tested it with Python 2.7.3 and VTK 5.10.1.<div><br></div><div style>I&#39;ve debugged it inside CPython, and this is what I found:</div><div style><br></div><div style>

<div>    In object.c(1100): calling PyObject_Hash(PyObject *v = vtkObject)<br></div><div><br></div><div>      PyTypeObject *tp = v-&gt;ob_type; // tp is &#39;vtkclass&#39; from &#39;vtkCommonPython&#39;</div><div><br></div>

<div>    It calls, in line 1111: PyType_Ready(tp)</div><div> </div><div>      (Which seems it should&#39;ve been called before)</div><div><br></div><div>    In PyType_Ready, typeobject.c(4028), it calls:</div><div><br></div>

<div>      mro_internal(type)</div><div><br></div><div>    Which fails, because the type does not have the &#39;mro&#39; attribute.</div><div><br></div><div><br></div><div style>  I&#39;ve created an issue here: <a href="http://vtk.org/Bug/view.php?id=14037">http://vtk.org/Bug/view.php?id=14037</a></div>

<div><br></div><div style>  Thanks!</div><div><br></div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, May 27, 2009 at 10:56 AM, Berk Geveci <span dir="ltr">&lt;<a href="mailto:berk.geveci@kitware.com" target="_blank">berk.geveci@kitware.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">This is definitely not intentional. Furthermore, I can&#39;t reproduce it<br>
on cvs head. Do you know what caused the problem between 5.0.3 and<br>
5.0.4. Also, can you try 5.4 as I don&#39;t think we support 5.0 anymore?<br>
<span class="HOEnZb"><font color="#888888"><br>
-berk<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
On Wed, May 27, 2009 at 1:19 AM, Carlos Scheidegger<br>
&lt;<a href="mailto:cscheid@sci.utah.edu">cscheid@sci.utah.edu</a>&gt; wrote:<br>
&gt; Here&#39;s a simpler way to trigger the issue I just mentioned. The core problem<br>
&gt; is related to generating a hash from the vtk class object. On VTK 5.0.3 (and<br>
&gt; Python 2.5.2), I get this:<br>
&gt;<br>
&gt;&gt;&gt;&gt; import vtk<br>
&gt;&gt;&gt;&gt; hash(vtk.vtkObject)<br>
&gt; 140169743808624<br>
&gt;&gt;&gt;&gt; id(vtk.vtkObject)<br>
&gt; 140169743808624<br>
&gt;<br>
&gt; This seems to me the correct behavior. On VTK 5.0.4 (and Python 2.6.2), I<br>
&gt; get this:<br>
&gt;<br>
&gt;&gt;&gt;&gt; hash(vtk.vtkObject)<br>
&gt; Traceback (most recent call last):<br>
&gt;  File &quot;&lt;stdin&gt;&quot;, line 1, in &lt;module&gt;<br>
&gt; AttributeError: mro<br>
&gt;&gt;&gt;&gt; id(vtk.vtkObject)<br>
&gt; 3083232608L<br>
&gt;<br>
&gt; Is this an intended change? It is very convenient to use vtk classes in<br>
&gt; python dictionaries...<br>
&gt;<br>
&gt; Thanks!<br>
&gt; -carlos<br>
&gt; _______________________________________________<br>
&gt; Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
&gt;<br>
&gt; Visit other Kitware open-source projects at<br>
&gt; <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
&gt;<br>
&gt; Please keep messages on-topic and check the VTK FAQ at:<br>
&gt; <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
&gt;<br>
&gt; Follow this link to subscribe/unsubscribe:<br>
&gt; <a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
&gt;<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
</div></div></blockquote></div><br></div>