enthought / enthought/mayavi

Intermittent error in traits

Open
#501 11 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

This code gives an intermittent error with vtk > 6.3
```
from mayavi import mlab
import numpy as np

my=np.array([[1,2,3],[4,5,6],[7,8,9]])
plotme=np.log(my)
plotme[np.isinf(plotme)]=0

mlab.figure(bgcolor=(0,0,0))
src=mlab.pipeline.scalar_field(plotme)
mlab.pipeline.volume(src)
mlab.pipeline.image_plane_widget(src,plane_orientation='y_axes')
mlab.xlabel('E')
mlab.ylabel('mu')
mlab.zlabel('P')
mlab.outline()
mlab.show()
```
traits.trait_errors.TraitError: The 'vector_component' trait of a SmartVolumeMapper instance must be 0 <= a long integer <= 3, but a value of 1750425008 was specified.
The number is not always the same and some times there is no error.
Changing to vtk 6.3 fixes the problem and it occurs in python 2 and 3. This is code cut down to show the error.
I also tried similar code in fedora rawhide which is the only one with vtk7.1 as yet.

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.