Comments (9)
What happens if you comment out only the first line of the if block:
if scene.light_manager is None:
scene.light_manager = light_manager.LightManager(scene)
from mayavi.
It works, but the mouse cursor keeps going 'busy' like the program is doing some work in the background and everything works much slower.
I commented this line:
scene.light_manager = light_manager.LightManager(scene)
from mayavi.
It works, but the mouse cursor keep going 'busy' like the program is doing some work in background.
Allright, so the issue seems to be that some software renderers cannot
cope with the lights that we give them. Can you, on a computer for which
you have the problem, play with the properties of the lights (for
instance by pressing 'l' on a scene) until you can get the rendering to
work again.
from mayavi.
I tried to change light mode, number of lights, lights properties (elevation, azimuth, intensity, color) but the mesh still keeps black colored without any effect.
from mayavi.
Even when setting the number of lights to 1?
from mayavi.
I can't set it to be less than 3, the error is:
The 'number_of_lights' trait of a LightManager instance must be 3 <= an integer <= 8, but a value of 1 <type 'int'> was specified.
from mayavi.
There is little point in setting the number of lights to one. VTK always creates one by default. I'm not sure why commenting the self.light_manager code keeps the cursor busy. This is strange and it has been a little too long since I wrote that code. :(
from mayavi.
This problem seems to still exist. I used the lfd.uci.edu Python library binaries to install VTK and ets, then copied the installed files to my Portable Python site-packages folder (since Portable Python doesn't show up on the Registry). After I got the wx_embedding example to load and found it was black, I tried compiling mayavi-4.3.1 from source, but that still didn't fix things. Then I found this thread.
I added
event.Skip()
return
just after this line:
self._vtk_control.OnPaint(event)
in this file:
https://github.com/enthought/mayavi/blob/master/tvtk/pyface/ui/wx/scene.py#L528
Pressing 'i' on my keyboard with the wx_embedding demo open did nothing, but clicking the gear (settings) icon and setting the foreground color to something other than white causes python to crash (segfault, not a Python exception). I enabled the faulthandler Python module for wx_embedding.py and got this Segfault Trace:
Fatal Python error: Segmentation fault
Current thread 0x0000027c:
File "C:\Portable Python 2.7.5.1\App\lib\site-packages\wx-2.9.4-msw\wx\_core.p...", line 9203 in DestroyChildren
File "C:\ThirdParty\lib\traitsui\wx\toolkit.py", line 477 in destroy_children
File "C:\ThirdParty\lib\traitsui\ui.py", line 323 in reset
File "C:\ThirdParty\lib\traitsui\ui.py", line 267 in finish
File "C:\ThirdParty\lib\traitsui\wx\ui_live.py", line 320 in close
File "C:\ThirdParty\lib\traitsui\wx\ui_live.py", line 360 in _on_ok
File "C:\Portable Python 2.7.5.1\App\lib\site-packages\wx-2.9.4-msw\wx\_core.p...", line 7952 in MainLoop
File "C:\Portable Python 2.7.5.1\App\lib\site-packages\wx-2.9.4-msw\wx\_core.p...", line 8660 in MainLoop
File "mayavi-4.3.1\examples\mayavi\interactive\wx_embedding.py", line 66 in <module>
strangely the error is slightly different in wx_mayavi_embed_in_notbook.py (I actually had to make some modifications to the way this .py file was calling wxPyhon, but I don't think that is related to the crash):
Thread 0x00000aa8:
File "C:\ThirdParty\lib\traitsui\image\image.py", line 292 in _process
File "C:\Portable Python 2.7.5.1\App\lib\threading.py", line 761 in run
File "C:\Portable Python 2.7.5.1\App\lib\threading.py", line 808 in __bootstrap_inner
File "C:\Portable Python 2.7.5.1\App\lib\threading.py", line 781 in __bootstrap
Current thread 0x0000026c:
File "C:\ThirdParty\lib\wx-3.0.1-msw-classic\wx\_core.py", line 9191 in DestroyChildren
File "C:\ThirdParty\lib\traitsui\wx\toolkit.py", line 477 in destroy_children
File "C:\ThirdParty\lib\traitsui\ui.py", line 323 in reset
File "C:\ThirdParty\lib\traitsui\ui.py", line 267 in finish
File "C:\ThirdParty\lib\traitsui\wx\ui_live.py", line 320 in close
File "C:\ThirdParty\lib\traitsui\wx\ui_live.py", line 360 in _on_ok
File "C:\ThirdParty\lib\wx-3.0.1-msw-classic\wx\_core.py", line 7952 in MainLoop
File "C:\ThirdParty\lib\wx-3.0.1-msw-classic\wx\_core.py", line 8657 in MainLoop
File "mayavi-4.3.1\examples\mayavi\interactive\wx_mayavi_embed_in_notebook.py", line 95 in <module>
I haven't tried this yet on my computer that I think should have graphics acceleration, I'm pretty sure the machine that is crashing doesn't have acceleration as it is a Virtual Machine.
Any ideas?
from mayavi.
This solved the exact same problem I encountered running Mayavi on a Windows 2003 Server machine over Remote Desktop.
If you're testing from within the Canopy IDE/Editor, you'll need to restart the kernel after commenting out the block starting with:
if scene.light_manager is None:
in tvtk/pyface/ui/qt4/scene.py
from mayavi.
Related Issues (20)
- Failed Cython compilation (Cython > 3.0) HOT 2
- mlab.savefig saves wrong resolution (for first two images in loop)
- Potential issue with upcoming changes in VTK
- itkwidgets error in Jupyter Notebook
- Update a mayavi plot programmatically
- Release? HOT 6
- Warnings reported in the Mayavi testsuite
- Warnings and errors reported by the tvtk testsuite
- ImportError: Could not import backend for traitsui.
- Moving the cursor into a mayavi window causes a crash
- pip install not working HOT 2
- [regression in 4.8.2] TVTK not built properly. HOT 1
- Mayavi example protein.py not working, plus the solution
- Scalar filed is not volume rendered with a colormap HOT 1
- GUI stutters when running an animation
- Problem getting started with Mayavi HOT 1
- When use mlab.figure, got error "AttributeError: type object 'Unimplemented' has no attribute 'process_events'" HOT 3
- wxPython not supported
- Mayavi Compatibility with Numpy2.0 HOT 1
- wglMakeCurrent failed in MakeCurrent() on Windows machine HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mayavi.