enthought / enthought/mayavi

XMLPolyDataWriter instance is 'read only'

Open
#495 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
1.4k
Forks
316
Avg merge
7h 44m
Merged PRs (30d)
5

Description

Hello,

I'm trying to use mayavi and tvtk with a VTK-7.1.0. When I want to write a XMLPolydata i have this error:

> TraitError Traceback (most recent call last)
> /home/antoine/Python/env_2.7/Eikonal_Sphere.py in ()
> 124
> 125
> --> 126 w = tvtk.XMLPolyDataWriter(input=mesh, file_name='data.vtp')
> 127 w.write()
> 128
>
> /home/antoine/Python/env_2.7/lib/python2.7/site-packages/tvtk/tvtk_classes.zip/tvtk_classes/xml_poly_data_writer.pyc``
>
> in __init__(self, obj, update, **traits)
> 46 """
> 47 def __init__(self, obj=None, update=True, **traits):
> ---> 48 tvtk_base.TVTKBase.__init__(self, vtk.vtkXMLPolyDataWriter, obj, update, **traits)
> 49
> 50 def _get_input(self):
>
> > /home/antoine/Python/env_2.7/lib/python2.7/site-packages/tvtk/tvtk_base.pyc
>
> in __init__(self, klass, obj, update, **traits)
> 334 # anyway.
> 335 self._in_set = 1
> --> 336 super(TVTKBase, self).__init__(**traits)
> 337 self._in_set = 0
> 338
>
> /home/antoine/Python/env_2.7/lib/python2.7/site-packages/traits/trait_handlers.pyc`
>
> in _read_only(object, name, value)
> 102 def _read_only ( object, name, value ):
> 103 raise TraitError, "The '%s' trait of %s instance is 'read only'." % (
> --> 104 name, class_of( object ) )
> 105
> 106 def _undefined_get ( object, name ):
>
> TraitError: The 'input' trait of a XMLPolyDataWriter instance is 'read only'."

Is it because of VTK-7.1 ?
Moreover when I'm trinyng to test contour3d with mlab.test_contour3d I have weird warning:

`
mlab.test_contour3d()
`

> (ipython:14519): Gdk-WARNING **: gdkdrawable-x11.c:952 drawable is not a pixmap or window
>
> (ipython:14519): Gdk-WARNING **: gdkdrawable-x11.c:952 drawable is not a pixmap or window
>
> (ipython:14519): Gdk-WARNING **: gdkdrawable-x11.c:952 drawable is not a pixmap or window
>
> (ipython:14519): Gdk-WARNING **: gdkdrawable-x11.c:952 drawable is not a pixmap or window
>
> (ipython:14519): Gdk-WARNING **: gdkdrawable-x11.c:952 drawable is not a pixmap or window
>
> (ipython:14519): Gdk-WARNING **: gdkdrawable-x11.c:952 drawable is not a pixmap or window
>
> (ipython:14519): Gdk-WARNING **: gdkdrawable-x11.c:952 drawable is not a pixmap or window
> Generic Warning: In /home/antoine/config/VTK-7.1.0/Common/ExecutionModel/vtkAlgorithm.cxx, line 1808
> vtkAlgorithm::SetUpdateExtent was deprecated for VTK 7.1 and will be removed in a future version.
>
> Generic Warning: In /home/antoine/config/VTK-7.1.0/Common/ExecutionModel/vtkAlgorithm.cxx, line 1796
> vtkAlgorithm::SetUpdateExtent was deprecated for VTK 7.1 and will be removed in a future version.
>
> Generic Warning: In /home/antoine/config/VTK-7.1.0/Common/ExecutionModel/vtkStreamingDemandDrivenPipeline.cxx, line 1531
> vtkStreamingDemandDrivenPipeline::SetUpdateExtent was deprecated for VTK 7.1 and will be removed in a future version.

I'm using Python2.7. I think that I will install a lower version of vtk in order to have Mayavi working as before I had.

Thank you,
Antoine

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.