mayavi icon indicating copy to clipboard operation
mayavi copied to clipboard

When use mlab.figure, got error "AttributeError: type object 'Unimplemented' has no attribute 'process_events'"

Open JLeere opened this issue 1 year ago • 5 comments
trafficstars

I am using the code of OccNerf, and got error as follows:

  figure = mlab.figure(size=(render_w, render_w/16*9), bgcolor=(1, 1, 1))
  File "/opt/conda/lib/python3.8/site-packages/mayavi/tools/figure.py", line 69, in figure
    engine.new_scene(name=name, size=size)
  File "/opt/conda/lib/python3.8/site-packages/apptools/scripting/recordable.py", line 48, in _wrapper
    result = func(*args, **kw)
  File "/opt/conda/lib/python3.8/site-packages/mayavi/core/engine.py", line 453, in new_scene
    process_ui_events()
  File "/opt/conda/lib/python3.8/site-packages/mayavi/core/common.py", line 81, in process_ui_events
    pyface.GUI.process_events()
AttributeError: type object 'Unimplemented' has no attribute 'process_events'
(base) root@hzhb1:~/OccNeRF# conda list mayavi
# packages in environment at /opt/conda:
#
# Name                    Version                   Build  Channel
mayavi                    4.8.2                    pypi_0    pypi

JLeere avatar Jul 10 '24 13:07 JLeere

It means GUI has no attribute named "process_events", which version of mayavi should I install?

JLeere avatar Jul 10 '24 13:07 JLeere

It means GUI has no attribute named "process_events", which version of mayavi should I install?

Metoo, any ideas now?

Rayn-Wu avatar Aug 08 '24 07:08 Rayn-Wu

It means GUI has no attribute named "process_events", which version of mayavi should I install?

Metoo, any ideas now?

skylaughing avatar Aug 13 '24 07:08 skylaughing

Commenting out that line in the common.py can solve the problem. I've tried and it seems ok for me. `def process_ui_events(): """Process GUI events.

This function merely abstracts the function so nothing is done when
no UI is running.
"""
if pyface is not None:
    # pyface.GUI.process_events()
    pass

` btw, version 4.8.1 is ok, but I haven't tried it.

fengyi233 avatar Sep 24 '24 12:09 fengyi233

have the same question: AttributeError("module 'mayavi' has no attribute 'figure'")

weixi234 avatar Nov 12 '24 08:11 weixi234