Error when using tvtk.visual.ring #387

Closed
hamogu opened this Issue May 23, 2016 · 2 comments

Comments

Projects
None yet
2 participants
@hamogu

hamogu commented May 23, 2016

The following code fails for me:

Python 2.7.11 |Anaconda 2.2.0 (x86_64)| (default, Dec  6 2015, 18:57:58) 
Type "copyright", "credits" or "license" for more information.

IPython 4.0.3 -- An enhanced Interactive Python.
?         -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help      -> Python's own help system.
object?   -> Details about 'object', use 'object??' for extra details.

In [1]: from tvtk.tools import visual

In [2]: r = visual.ring()
ERROR: In -------src-dir--------/VTK5.10.1/Filtering/vtkDemandDrivenPipeline.cxx, line 727
vtkStreamingDemandDrivenPipeline (0x112cf3840): Input port 0 of algorithm vtkPolyDataNormals(0x117f125b0) has 0 connections but is not optional.

ERROR: In -------src-dir--------/VTK5.10.1/Filtering/vtkDemandDrivenPipeline.cxx, line 727
vtkStreamingDemandDrivenPipeline (0x11d2b93c0): Input port 0 of algorithm vtkTubeFilter(0x11d2b8210) has 0 connections but is not optional.

---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-2-598a65bd376f> in <module>()
----> 1 r = visual.ring()

/Users/hamogu/anaconda/lib/python2.7/site-packages/tvtk/tools/visual.pyc in __init__(self, **traits)
    771 
    772         self._create_points()
--> 773         self._pos_changed(numpy.array([0.0, 0.0, 0.0]), self.pos)
    774         self._x_changed(self.x)
    775         self._y_changed(self.y)

/Users/hamogu/anaconda/lib/python2.7/site-packages/tvtk/tools/visual.pyc in _pos_changed(self, old, new)
    867         self.normals.update()
    868         self.tube.update()
--> 869         self.actor.mapper.update()
    870         self.render()
    871 

AttributeError: 'NoneType' object has no attribute 'update'

I use mayavi+tvtk 4.4.0 and vtk 5.10.1 installed through anaconda on MacOSX (see code snippet for python and Ipython versions).
I get the same error for visual.sphere() and visual.arrow() but visual.box() works with no problems.

@prabhuramachandran

This comment has been minimized.

Show comment
Hide comment
@prabhuramachandran

prabhuramachandran Jul 26, 2016

Member

There is a lot of cruft in the visual code. I've fixed this in #416.

Member

prabhuramachandran commented Jul 26, 2016

There is a lot of cruft in the visual code. I've fixed this in #416.

@prabhuramachandran

This comment has been minimized.

Show comment
Hide comment
@prabhuramachandran

prabhuramachandran Aug 1, 2016

Member

Am closing this for now, please reopen if there are issues.

Member

prabhuramachandran commented Aug 1, 2016

Am closing this for now, please reopen if there are issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment