# Pybrain: M/EEG analysis with MNE Python (Problem to visualize the raw data)

**URL:** <https://mne.discourse.group/t/pybrain-m-eeg-analysis-with-mne-python-problem-to-visualize-the-raw-data/4644>\
**Category:** Support & Discussions\
**Tags:** visualization, qt-browser\
**Created:** [March 29, 2022, 4:03pm UTC](https://mne.discourse.group/t/pybrain-m-eeg-analysis-with-mne-python-problem-to-visualize-the-raw-data/4644 "2022-03-29T16:03:45Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![alexandreokano](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/alexandreokano/32/1307_2.png) [@alexandreokano](https://mne.discourse.group/u/alexandreokano)\
**Post date:** [March 29, 2022, 4:03pm UTC](https://mne.discourse.group/t/pybrain-m-eeg-analysis-with-mne-python-problem-to-visualize-the-raw-data/4644/1 "2022-03-29T16:03:45Z")

</div>

Hi,

I am trying to load raw data [01-read\_raw\_crop\_filter.ipynb](https://github.com/hoechenberger/pybrain_mne/blob/main/01-read_raw_crop_filter.ipynb) but having this issue:

raw.plot()

Using qt as 2D backend.  
Opening raw-browser…  
qt.qpa.drawing: Layer-backing can not be explicitly controlled on 10.14 when built against the 10.14 SDK  
Using pyopengl with version 3.1.6  
\<mne\_qt\_browser.\_pg\_figure.PyQtGraphBrowser at 0x1671c7e20\>

It opens a new window that I can see the raw data however didn’t conclude the opening process… So it can’t be accessed

- MNE version: e.g. 1.0.0
- operating system: e.g. macOS Big Sur 11.6.5 / Python 3.10.4

---

<div class="post-metadata">

**Author:** ![richard](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/richard/32/15_2.png) [@richard](https://mne.discourse.group/u/richard)\
**Post date:** [March 29, 2022, 7:50pm UTC](https://mne.discourse.group/t/pybrain-m-eeg-analysis-with-mne-python-problem-to-visualize-the-raw-data/4644/2 "2022-03-29T19:50:20Z")

</div>

Hello @alexandreokano and welcome to the forum!

This is a known issue with the new visualization GUI, which we are tracking here:

> <https://github.com/mne-tools/mne-qt-browser/issues/72>
>
> When plotting from an interactive Python session (IPython, Jupyter), the plot wi…ndow opens and freezes unless one passes \`block=True\`, which \*\*is\*\* mentioned in the docs here but not intuitive for our users. It has to do with the Qt event loop.
> 
> In fact, I felt the urge to point out this behavior in a service tweet:
> https://twitter.com/mne\_news/status/1506938707705802753
> 
> There must be a way to make this behavior better and work without freezing the window even if \`block\` is not passed. @GuillaumeFavelier achieved something like this with \`Brain\`, maybe you could share your wisdom here? 🙏

The easiest fix is either to run

```python
%matplotlib qt

```

in a single notebook cell early on, or to add `block=True` to the plotting calls, like this:

```python
raw.plot(block=True)

```

Best wishes  
Richard

---

<div class="post-metadata">

**Author:** ![alexandreokano](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/alexandreokano/32/1307_2.png) [@alexandreokano](https://mne.discourse.group/u/alexandreokano)\
**Post date:** [March 29, 2022, 8:18pm UTC](https://mne.discourse.group/t/pybrain-m-eeg-analysis-with-mne-python-problem-to-visualize-the-raw-data/4644/3 "2022-03-29T20:18:47Z")

</div>

Dear Richard,

Many thanks! It fixed.

Best wishes,

---

<div class="post-metadata">

**Author:** ![richard](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/richard/32/15_2.png) [@richard](https://mne.discourse.group/u/richard)\
**Post date:** [April 5, 2022, 10:18am UTC](https://mne.discourse.group/t/pybrain-m-eeg-analysis-with-mne-python-problem-to-visualize-the-raw-data/4644/4 "2022-04-05T10:18:12Z")

</div>

@alexandreokano This has been resolved in the latest version of `mne-qt-browser`, which is also included in our updated installers.

---

<div class="post-metadata">

**Author:** ![alexandreokano](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/alexandreokano/32/1307_2.png) [@alexandreokano](https://mne.discourse.group/u/alexandreokano)\
**Post date:** [April 5, 2022, 7:08pm UTC](https://mne.discourse.group/t/pybrain-m-eeg-analysis-with-mne-python-problem-to-visualize-the-raw-data/4644/5 "2022-04-05T19:08:32Z")

</div>

Thanks for the update!
