# mne.viz.plot\_source\_estimates generates a blank	window

**URL:** <https://mne.discourse.group/t/mne-viz-plot-source-estimates-generates-a-blank-window/1009>\
**Category:** Mailing List Archive (read-only)\
**Tags:** list-archive\
**Created:** [April 26, 2016, 5:30pm UTC](https://mne.discourse.group/t/mne-viz-plot-source-estimates-generates-a-blank-window/1009 "2016-04-26T17:30:19Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [April 26, 2016, 5:30pm UTC](https://mne.discourse.group/t/mne-viz-plot-source-estimates-generates-a-blank-window/1009/1 "2016-04-26T17:30:19Z")

</div>

Hi, I ran mne.viz.plot\_source\_estimates(stc,subject=\<subject\_name\>,...) but  
I got a blank window and this error:

(\<unknown\>:39799): Gtk-WARNING \*\*: gtk\_disable\_setlocale() must be called  
before gtk\_init()  
Traceback (most recent call last):  
&nbsp;&nbsp;File  
"/usr/pubsw/packages/python/anaconda/lib/python2.7/site-packages/IPython/core/interactiveshell.py",  
line 3035, in run\_code  
&nbsp;&nbsp;&nbsp;&nbsp;exec(code\_obj, self.user\_global\_ns, self.user\_ns)  
&nbsp;&nbsp;File "\<ipython-input-1-16aa827441a7\>", line 1, in \<module\>

mne.viz.plot\_source\_estimates(stc,subject='eeganes03',surface='inflated',hemi='lh',colormap='auto',time\_label='time=%0.2fms',smoothing\_steps=10,transparent=None,alpha=1.0,time\_viewer=False,config\_opts=None,subjects\_dir=None,figure=None,views='lat',colorbar=True,clim='auto')  
&nbsp;&nbsp;File  
"/usr/pubsw/packages/python/anaconda/lib/python2.7/site-packages/mne/viz/\_3d.py",  
line 593, in plot\_source\_estimates  
&nbsp;&nbsp;&nbsp;&nbsp;brain = Brain(subject, hemi, surface, \*\*kwargs)  
&nbsp;&nbsp;File  
"/usr/pubsw/packages/python/anaconda/lib/python2.7/site-packages/surfer/viz.py",  
line 395, in \_\_init\_\_  
&nbsp;&nbsp;&nbsp;&nbsp;self.\_scene\_size, offscreen)  
&nbsp;&nbsp;File  
"/usr/pubsw/packages/python/anaconda/lib/python2.7/site-packages/surfer/viz.py",  
line 212, in \_make\_viewer  
&nbsp;&nbsp;&nbsp;&nbsp;figure = mlab.figure(title, size=(w, h))  
&nbsp;&nbsp;File  
"/usr/pubsw/packages/python/anaconda/lib/python2.7/site-packages/mayavi/tools/figure.py",  
line 86, in figure  
&nbsp;&nbsp;&nbsp;&nbsp;engine.new\_scene(name=name, size=size)  
&nbsp;&nbsp;File  
"/usr/pubsw/packages/python/anaconda/lib/python2.7/site-packages/apptools/scripting/recordable.py",  
line 45, in \_wrapper  
&nbsp;&nbsp;&nbsp;&nbsp;result = func(\*args, \*\*kw)  
&nbsp;&nbsp;File  
"/usr/pubsw/packages/python/anaconda/lib/python2.7/site-packages/mayavi/core/engine.py",  
line 434, in new\_scene  
&nbsp;&nbsp;&nbsp;&nbsp;viewer = self.scene\_factory(\*\*factory\_kwargs)  
&nbsp;&nbsp;File  
"/usr/pubsw/packages/python/anaconda/lib/python2.7/site-packages/mayavi/core/ui/mayavi\_scene.py",  
line 89, in viewer\_factory  
&nbsp;&nbsp;&nbsp;&nbsp;viewer.open()  
&nbsp;&nbsp;File  
"/usr/pubsw/packages/python/anaconda/lib/python2.7/site-packages/pyface/i\_window.py",  
line 145, in open  
&nbsp;&nbsp;&nbsp;&nbsp;self.\_create()  
&nbsp;&nbsp;File  
"/usr/pubsw/packages/python/anaconda/lib/python2.7/site-packages/pyface/ui/wx/application\_window.py",  
line 151, in \_create  
&nbsp;&nbsp;&nbsp;&nbsp;contents = self.\_create\_contents(body)  
&nbsp;&nbsp;File  
"/usr/pubsw/packages/python/anaconda/lib/python2.7/site-packages/tvtk/tools/ivtk.py",  
line 392, in \_create\_contents  
&nbsp;&nbsp;&nbsp;&nbsp;self.scene = self.\_scene\_factory(parent)  
&nbsp;&nbsp;File  
"/usr/pubsw/packages/python/anaconda/lib/python2.7/site-packages/mayavi/core/ui/mayavi\_scene.py",  
line 68, in mayavi\_scene\_factory  
&nbsp;&nbsp;&nbsp;&nbsp;s = MayaviScene(parent, stereo=p['stereo'])  
&nbsp;&nbsp;File  
"/usr/pubsw/packages/python/anaconda/lib/python2.7/site-packages/tvtk/pyface/ui/wx/decorated\_scene.py",  
line 69, in \_\_init\_\_  
&nbsp;&nbsp;&nbsp;&nbsp;super(DecoratedScene, self).\_\_init\_\_(parent, \*\*traits)  
&nbsp;&nbsp;File  
"/usr/pubsw/packages/python/anaconda/lib/python2.7/site-packages/tvtk/pyface/ui/wx/scene.py",  
line 302, in \_\_init\_\_  
&nbsp;&nbsp;&nbsp;&nbsp;super(Scene, self).\_\_init\_\_(parent, \*\*traits)  
&nbsp;&nbsp;File  
"/usr/pubsw/packages/python/anaconda/lib/python2.7/site-packages/tvtk/pyface/tvtk\_scene.py",  
line 201, in \_\_init\_\_  
&nbsp;&nbsp;&nbsp;&nbsp;self.control = self.\_create\_control(parent)  
&nbsp;&nbsp;File  
"/usr/pubsw/packages/python/anaconda/lib/python2.7/site-packages/tvtk/pyface/ui/wx/decorated\_scene.py",  
line 103, in \_create\_control  
&nbsp;&nbsp;&nbsp;&nbsp;self.\_panel)  
&nbsp;&nbsp;File  
"/usr/pubsw/packages/python/anaconda/lib/python2.7/site-packages/tvtk/pyface/ui/wx/scene.py",  
line 575, in \_create\_control  
&nbsp;&nbsp;&nbsp;&nbsp;stereo=self.stereo)  
&nbsp;&nbsp;File  
"/usr/pubsw/packages/python/anaconda/lib/python2.7/site-packages/tvtk/pyface/ui/wx/wxVTKRenderWindowInteractor.py",  
line 186, in \_\_init\_\_  
&nbsp;&nbsp;&nbsp;&nbsp;attribList=attribList)  
&nbsp;&nbsp;File  
"/usr/pubsw/packages/python/anaconda/lib/python2.7/site-packages/wx-3.0-gtk2/wx/glcanvas.py",  
line 106, in \_\_init\_\_  
&nbsp;&nbsp;&nbsp;&nbsp;\_glcanvas.GLCanvas\_swiginit(self,\_glcanvas.new\_GLCanvas(\*args,  
\*\*kwargs))  
TypeError: Argument given by name ('attribList') and position (3)

I get the same error whether or not I set the 'SUBJECT' environment  
variable (using os.environ['SUBJECT']=\<subject\_name\>. Could anyone tell me  
how to get around this?

Best,  
Gladia  
-------------- next part --------------  
An HTML attachment was scrubbed...  
URL: [http://mail.nmr.mgh.harvard.edu/pipermail/mne\_analysis/attachments/20160426/6b1cbcf7/attachment.html](http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20160426/6b1cbcf7/attachment.html)

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [April 26, 2016, 5:35pm UTC](https://mne.discourse.group/t/mne-viz-plot-source-estimates-generates-a-blank-window/1009/2 "2016-04-26T17:35:03Z")

</div>

Oh, this does not look nice. Does anybody have experience with Mayavi on  
Windows? Eric?

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [April 26, 2016, 5:54pm UTC](https://mne.discourse.group/t/mne-viz-plot-source-estimates-generates-a-blank-window/1009/3 "2016-04-26T17:54:56Z")

</div>

Is this on Windows? That looks like a Unix directory structure to me.

In any case, it looks like a bug with Anaconda to me. It will probably be  
tough to debug. If you can make an mne-python issue, we can try to isolate  
it to some minimal example that only uses Mayavi. Then the Anaconda folks  
can fix it hopefully.

In the meantime, do you know if your packages are up to date? You can  
normally do e.g. `conda update mayavi` but it looks like you're on a site  
install, so you'll have to ask your IT folks (and maybe see if they can  
replicate it, too).

Eric

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [April 26, 2016, 5:59pm UTC](https://mne.discourse.group/t/mne-viz-plot-source-estimates-generates-a-blank-window/1009/4 "2016-04-26T17:59:00Z")

</div>

My bad, Eric, it's Linux.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [April 26, 2016, 6:00pm UTC](https://mne.discourse.group/t/mne-viz-plot-source-estimates-generates-a-blank-window/1009/5 "2016-04-26T18:00:51Z")

</div>

Hi,

This is on Linux.

Sure, should I post the error on github?

I'm quite new to python so I don't know how to check if my packages are up  
to date. I'm using the python package installed on the cluster at the  
Martinos center. I'll check with the IT folks, thanks!

Best,  
Gladia

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [April 26, 2016, 6:05pm UTC](https://mne.discourse.group/t/mne-viz-plot-source-estimates-generates-a-blank-window/1009/6 "2016-04-26T18:05:17Z")

</div>

Yeah go ahead and make an issue, we'll try to isolate the problem there.

Eric
