question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

I've a problem with "plot_sensors_connectivity" visualization

See original GitHub issue

My goal is to compute EEG connectivity, so I run this code below in order to compute connectivity. con, freqs, times, n_epochs, n_tapers = spectral_connectivity(epoch, method='pli', mode='multitaper', sfreq=2048, fmin=4, fmax=8, faverage=True, mt_adaptive=False, n_jobs=1)

And, I also need to visualize the connectivity, so I use this code plot_sensors_connectivity(epoch.info, con[:, :, 0]) But, turn out it gave me this error

AttributeError: ‘NoneType’ object has no attribute ‘_Renderer’

(I have used EEG biosemi32 measuring brain wave, set montage with ‘biosemi32’) epoch.set_montage('biosemi32')

Thank you

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
GuillaumeFaveliercommented, May 15, 2020

ERROR:root:bad X server connection. DISPLAY=

AFAIK, this means that the environment does not provide a window with an opengl context. I’m afraid this is an implicit requirement for now with the pyvista 3d backend (it’s more a vtk issue really).

A way to mitigate could be to use a xvfb server to simulate this but I’m not familiar enough with Google Colab to help you set up that. A config example is available in .circleci/config.

On the bright side, there is active work to add support for headless remote visualization as we speak in https://github.com/mne-tools/mne-python/pull/7758 for example.

Any other ideas to make it work @agramfort , @hoechenberger ?

1reaction
Sirabhopcommented, May 15, 2020

mne.sys_info()

Platform: Linux-4.19.104±x86_64-with-Ubuntu-18.04-bionic Python: 3.6.9 (default, Apr 18 2020, 01:56:04) [GCC 8.4.0] Executable: /usr/bin/python3 CPU: x86_64: 2 cores Memory: 12.7 GB

mne: 0.20.4 numpy: 1.18.4 {blas=openblas, lapack=openblas} scipy: 1.4.1 matplotlib: 3.2.1 {backend=module://ipykernel.pylab.backend_inline}

sklearn: 0.22.2.post1 numba: 0.48.0 nibabel: 3.0.2 cupy: Not found pandas: 1.0.3 dipy: Not found mayavi: Not found pyvista: 0.24.2 vtk: 8.1.2

Read more comments on GitHub >

github_iconTop Results From Across the Web

Problem with plot_sensors_connectivity - Support & Discussions
I have problem in plotting connectivity in sensor space. I wrote the following code. import mne from mne_connectivity import ...
Read more >
Examples Gallery — MNE 1.0.3 documentation
Plot sensor denoising using oversampled temporal projection ... Examples demonstrating connectivity analysis in sensor and source space.
Read more >
Problem with ZHA network visualization - Zigbee
For reference, I've been running 3 Aqara Temperature/Humidity/Pressure sensors for about 6mo now. The zha-network-card always shows them as ...
Read more >
Why IBM IoT Visualization sample app not displaying live data, while ...
I am using Node-RED IBM-IoT-Out node on Raspberry Pi sending JSON sensor data to Bluemix (thru a Wifi connected to the Internet). The...
Read more >
2d disk connectivity plot from script - Discussions - Brainstorm
The reason I wish to do this is because I wish to visualize the granger topography at each frequency and also create a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found