Coder Social home page Coder Social logo

Topo Error about visbrain HOT 69 CLOSED

etiennecmb avatar etiennecmb commented on May 18, 2024
Topo Error

from visbrain.

Comments (69)

EtienneCmb avatar EtienneCmb commented on May 18, 2024 1

Install the latest vispy version :
pip install git+https://github.com/vispy/vispy.git, i think they removed this warning message

from visbrain.

EtienneCmb avatar EtienneCmb commented on May 18, 2024 1

If I remember correctly, vispy was using iscocurve from Matplotlib 2.1. Then, isocurve has been removed from Matplotlib 2.2+ and vispy add this warning message. So, two possibilities :

  • You need to draw isocurve like the regulary spaced levels example. In that case, install the latest vispy version using pip install git+https://github.com/vispy/vispy.git and scikit-image : pip install scikit-image
  • You doesn't need isocurve : in that case, you can keep the Matplotlib and Vispy versions you want and just ignore this warning message

from visbrain.

EtienneCmb avatar EtienneCmb commented on May 18, 2024 1
  • I thought PyQt5 was already installed?
  • Do you need isocurves?
  • Vispy only display a warning message, this is not a big deal. Please, test if Topo works before trying to upgrade pyqt5 or vispy

from visbrain.

EtienneCmb avatar EtienneCmb commented on May 18, 2024 1

Hi @STREETKILLER007 ,

Here's some ideas :

  • Try to install pyopenl : pip install pandas PyOpenGL
  • Try the following code :
from visbrain.objects import BrainObj
BrainObj('B1').preview()
  • Did you take a look at MNE-Python?

I'm not sure to understand what the conda install "pyqt<5" does because in your first pip list I can't see PyQt4 / 5 installed. But, at least on my computer, I remember I had issues with he PyQt5 installed using conda and I had to remove it and use pip.

I can show you the steps used to configure from scratch the environnement using conda :

  • Create the 3.6 env : conda create -q -n py36 python=3.6 numpy scipy pip
  • Activate the environnement : source activate py36
  • Install dependencies : pip install matplotlib pyqt5 vispy pillow
  • Install visbrain : pip install visbrain
  • Optional dependencies : pip install PyOpenGL PyOpenGL_accelerate
  • Enjoy (or not):
from visbrain import Brain
Brain().show()

from visbrain.

STREETKILLER007 avatar STREETKILLER007 commented on May 18, 2024 1

Leave it open first since i will be trying to work on my pc...

from visbrain.

EtienneCmb avatar EtienneCmb commented on May 18, 2024 1

Well, RAM is also useful :)

But yeah, not so much because I've a very old computer and it works just fine. I've also installed Visbrain at least on 10 systems including OSx, Windows and several Linux versions and never had a big issue (except yours...). On the visbrain's chat, there's also many users that finally got it works

from visbrain.

STREETKILLER007 avatar STREETKILLER007 commented on May 18, 2024 1

Below is my spec :

  1. processor
    Intel(R) Pentium(R) CPU B980 @ 2.40GHz

  2. graphic card
    Intel(R) HD Graphics

  3. ram
    10gb, ddr 3

from visbrain.

EtienneCmb avatar EtienneCmb commented on May 18, 2024

GitMate.io thinks possibly related issues are #12 (Brain import error), #13 (Import error: cannot import _cntr), and #17 (Hello I cant open visbrain everytime i get same error ).

from visbrain.

EtienneCmb avatar EtienneCmb commented on May 18, 2024

Hi @STREETKILLER007 , the command pip install matplotlib==2.1.0 doesn't works?

from visbrain.

STREETKILLER007 avatar STREETKILLER007 commented on May 18, 2024

the command pip install matplotlib==2.1.0 doesn't work.
it shows the red word error message.

from visbrain.

EtienneCmb avatar EtienneCmb commented on May 18, 2024

May be this can help you, but I can't really help as I'v never experienced issues with matplotlib installation...

from visbrain.

STREETKILLER007 avatar STREETKILLER007 commented on May 18, 2024

i see, i try to read through and try it out.
Thank You.

from visbrain.

STREETKILLER007 avatar STREETKILLER007 commented on May 18, 2024

update information

  1. i am using windows 7 64 bit version.
  2. i am using python 3.7 64 bit version.
  3. the version of my pip version is as below

capture

  1. the version of my setup tool version is as below

capture

  1. the version of my matplotlib is as below

capture

  1. tried to upgrade vispy, but it is up to date,

capture

from visbrain.

EtienneCmb avatar EtienneCmb commented on May 18, 2024

Can you try to create a python 3.6 environnement?

from visbrain.

STREETKILLER007 avatar STREETKILLER007 commented on May 18, 2024

since i am using python 3.7 and my pc can't support visual machine, so i am trying to uninstall python 3.7 and install python 3.6.

from visbrain.

STREETKILLER007 avatar STREETKILLER007 commented on May 18, 2024

i installed python 3.6.

i run the code from my desktop.
testpy

but another question appeared.

  1. modulenotfound
    capture

===

but i saw the package in under C:\Users\JamesTan.
visbrain

tried comment pip install visbrain
but it ended up with this error
error

tried comment pip install matplotlib==2.1.0
it works successfully.

from visbrain.

STREETKILLER007 avatar STREETKILLER007 commented on May 18, 2024

I solved ModuleNotFound by following :

i tried to remove visbrain folder from C:\Users\JamesTan.

tried comment pip install visbrain
it works.
visbrain locat

i tried to run this file from my desktop.
testpy

it pops out this error.
python 3 6 error

the error message is as below
ImportError : DLL load failed: The specified procedure could not be found.

from visbrain.

STREETKILLER007 avatar STREETKILLER007 commented on May 18, 2024

i tried to download python 3.5.2 and deleted python 3.6.

and tried pip install matplotlib==2.1.0 and pip install visbrain
this 2 comment succeeds.

when i try to run this.
testpy

it still pops out this error.
pythron 352 error

the error message still the same
ImportError : DLL load failed: The specified procedure could not be found.

from visbrain.

EtienneCmb avatar EtienneCmb commented on May 18, 2024

I'm not sure to understand why you can't have multiple environnement without removing / installing different python versions. You can install a package manager like anaconda and have multiple environnements.

Matplotlib installation run smoothly? I guess PyQt5 is not properly installed. It could also be an issue with ipython. Try to download this python source code and then from your terminal run python 00_basic_topoplot.py

from visbrain.

STREETKILLER007 avatar STREETKILLER007 commented on May 18, 2024

i tried to download the python source code that you provided, then from my terminal, i run python 00_basic_topoplot.py

it pops up an error message, which is
ImportError : DLL load failed: The specified procedure could not be found.

I tried to install anaconda.
Thank for the knowledge.

from visbrain.

STREETKILLER007 avatar STREETKILLER007 commented on May 18, 2024

i was using python 3.5.2.
after running pip install matplotlib==2.1.0 and pip install visbrain
i realized that PyQt5 is already inside Lib\site-packages.

from visbrain.

STREETKILLER007 avatar STREETKILLER007 commented on May 18, 2024

tried to run this program using python 3.6 environment created by anaconda.

still show
ImportError : DLL load failed: The specified procedure could not be found.

by the way, PyQt5 was already at latest version.

from visbrain.

STREETKILLER007 avatar STREETKILLER007 commented on May 18, 2024

I tried to post this situation in stack over flow. You can refer to this

from visbrain.

EtienneCmb avatar EtienneCmb commented on May 18, 2024

On stack overflow you said you tried to install PyQt using pip install PyQt5, you mean pip install pyqt5? Also, this might be interesting

from visbrain.

STREETKILLER007 avatar STREETKILLER007 commented on May 18, 2024

i believe pyqt5 and PyQt5 are the same.
i read the article, but still no solution.

from visbrain.

EtienneCmb avatar EtienneCmb commented on May 18, 2024

well, yes... But I remember that using conda I had to conda install PyQt5 and using pip pip install pyqt5

from visbrain.

STREETKILLER007 avatar STREETKILLER007 commented on May 18, 2024

i will try and see.
but now i am using my real environment instead of visual environment...

from visbrain.

EtienneCmb avatar EtienneCmb commented on May 18, 2024

Ok you don't use conda?

from visbrain.

STREETKILLER007 avatar STREETKILLER007 commented on May 18, 2024

i am using conda to set up a python 3.6.0 environment.
but in my real environment, i am using python 3.6.0.

i am trying to work out on my real environment.

from visbrain.

EtienneCmb avatar EtienneCmb commented on May 18, 2024

Ok. I also remember that the PyQt5 import fail if it was using the conda one. May be you could remove PyQt5 and try to install it again using pip install pyqt5

from visbrain.

STREETKILLER007 avatar STREETKILLER007 commented on May 18, 2024

i will try to remove PyQt5 from my real environment using pip uninstall pyqt5 and try to install it again using pip install pyqt5

from visbrain.

STREETKILLER007 avatar STREETKILLER007 commented on May 18, 2024

ok, i tried to remove remove PyQt5 from my real environment using pip uninstall pyqt5 and try to install it again using pip install pyqt5

but it still pops out the same error.

from visbrain.

EtienneCmb avatar EtienneCmb commented on May 18, 2024

May be this can be interesting if you don't already saw it !

from visbrain.

STREETKILLER007 avatar STREETKILLER007 commented on May 18, 2024

but the link that you shared is mostly on visual environment.
but i am working on real environment...

from visbrain.

EtienneCmb avatar EtienneCmb commented on May 18, 2024

Yes, but some people experienced issues with miktex

from visbrain.

STREETKILLER007 avatar STREETKILLER007 commented on May 18, 2024

i uninstalled matplotlib by pip uninstall matplotlib and install it again by pip install matplotlib==2.1.0 in my real environment.

but it still pop out the same error.

by the way, i did not install miktex on my machine.

from visbrain.

STREETKILLER007 avatar STREETKILLER007 commented on May 18, 2024

according to https://stackoverflow.com/questions/36666225/pyqt5-the-dll-load-failed-the-specified-module-could-not-be-found/36673656

i solved ImportError : DLL load failed: The specified procedure could not be found. by downgrading my python to python 3.5 since pyqt5 only support up to python 3.5 currently.

after i tried pip install visbrain, pyqt5 was installed, but ImportError : DLL load failed: The specified procedure could not be found. still pop out
what i did was :

  1. uninstall pyqt5 by pip uninstall pyqt5
  2. downloaded pyqt5 from this download website since i am using 64 bit version. After that, install this downloaded file.

from visbrain.

STREETKILLER007 avatar STREETKILLER007 commented on May 18, 2024

i tried to run the topo function that u passed to me a few days ago, it pops out this long error.

by the way, i am using Intel R HD Graphic.

Would like to know what should i modify in the example code to run this code, thank you.

WARNING: QWindowsWindow::setGeometry: Unable to set geometry 1188x907+8+30 on QW
idgetWindow/'MainWindowWindow'. Resulting geometry:  1188x750+8+30 (frame: 8, 30
, 8, 8, custom margin: 0, 0, 0, 0, minimum size: 3x59, maximum size: 16777215x16
777215).
WARNING: Error drawing visual <vispy.visuals.mesh.MeshVisual object at 0x0000000
015065160>
WARNING: Traceback (most recent call last):
  File "test.py", line 17, in <module>
    t.show()
  File "D:\Python 35\lib\site-packages\visbrain\pyqt_module.py", line 106, in sh
ow
    CONFIG['VISPY_APP'].run()
  File "D:\Python 35\lib\site-packages\vispy\app\application.py", line 142, in r
un
    return self._backend._vispy_run()
  File "D:\Python 35\lib\site-packages\vispy\app\backends\_qt.py", line 229, in
_vispy_run
    return app.exec_()
  File "D:\Python 35\lib\site-packages\vispy\app\backends\_qt.py", line 436, in
event
    out = super(QtBaseCanvasBackend, self).event(ev)
  File "D:\Python 35\lib\site-packages\vispy\app\backends\_qt.py", line 708, in
paintGL
    self._vispy_canvas.events.draw(region=None)
  File "D:\Python 35\lib\site-packages\vispy\util\event.py", line 455, in __call
__
    self._invoke_callback(cb, event)
  File "D:\Python 35\lib\site-packages\vispy\util\event.py", line 475, in _invok
e_callback
    self, cb_event=(cb, event))
  File "D:\Python 35\lib\site-packages\vispy\util\logs.py", line 323, in _handle
_exception
    logger.log_exception()
  File "D:\Python 35\lib\site-packages\vispy\util\logs.py", line 265, in log_exc
eption
    stack = "".join(traceback.format_stack()[:-tb_skip])
  << caught exception here: >>
  File "D:\Python 35\lib\site-packages\vispy\util\event.py", line 471, in _invok
e_callback
    cb(event)
  File "D:\Python 35\lib\site-packages\vispy\scene\canvas.py", line 207, in on_d
raw
    self._draw_scene()
  File "D:\Python 35\lib\site-packages\vispy\scene\canvas.py", line 253, in _dra
w_scene
    self.draw_visual(self.scene)
  File "D:\Python 35\lib\site-packages\vispy\scene\canvas.py", line 291, in draw
_visual
    node.draw()
  File "D:\Python 35\lib\site-packages\vispy\scene\visuals.py", line 98, in draw

    self._visual_superclass.draw(self)
  File "D:\Python 35\lib\site-packages\vispy\visuals\visual.py", line 588, in dr
aw
    v.draw()
  File "D:\Python 35\lib\site-packages\vispy\visuals\mesh.py", line 517, in draw

    Visual.draw(self, *args, **kwds)
  File "D:\Python 35\lib\site-packages\vispy\visuals\visual.py", line 440, in dr
aw
    self._vshare.index_buffer)
  File "D:\Python 35\lib\site-packages\vispy\visuals\shaders\program.py", line 7
7, in draw
    Program.draw(self, *args, **kwargs)
  File "D:\Python 35\lib\site-packages\vispy\gloo\program.py", line 470, in draw

    canvas.context.flush_commands()
  File "D:\Python 35\lib\site-packages\vispy\gloo\context.py", line 170, in flus
h_commands
    self.shared.parser.parse([('CURRENT', 0)])
  File "D:\Python 35\lib\site-packages\vispy\gloo\glir.py", line 477, in parse
    self._parse(command)
  File "D:\Python 35\lib\site-packages\vispy\gloo\glir.py", line 404, in _parse
    self._gl_initialize()
  File "D:\Python 35\lib\site-packages\vispy\gloo\glir.py", line 502, in _gl_ini
tialize
    if this_version < '2.1':
  File "D:\Python 35\lib\distutils\version.py", line 52, in __lt__
    c = self._cmp(other)
  File "D:\Python 35\lib\distutils\version.py", line 335, in _cmp
    if self.version == other.version:
AttributeError: 'LooseVersion' object has no attribute 'version'
ERROR: Invoking <bound method SceneCanvas.on_draw of <SceneCanvas (PyQt5) at 0x6
d145f8>> for DrawEvent
WARNING: Traceback (most recent call last):
  File "test.py", line 17, in <module>
    t.show()
  File "D:\Python 35\lib\site-packages\visbrain\pyqt_module.py", line 106, in sh
ow
    CONFIG['VISPY_APP'].run()
  File "D:\Python 35\lib\site-packages\vispy\app\application.py", line 142, in r
un
    return self._backend._vispy_run()
  File "D:\Python 35\lib\site-packages\vispy\app\backends\_qt.py", line 229, in
_vispy_run
    return app.exec_()
  File "D:\Python 35\lib\site-packages\vispy\app\backends\_qt.py", line 436, in
event
    out = super(QtBaseCanvasBackend, self).event(ev)
  File "D:\Python 35\lib\site-packages\vispy\app\backends\_qt.py", line 708, in
paintGL
    self._vispy_canvas.events.draw(region=None)
  File "D:\Python 35\lib\site-packages\vispy\util\event.py", line 455, in __call
__
    self._invoke_callback(cb, event)
  File "D:\Python 35\lib\site-packages\vispy\util\event.py", line 475, in _invok
e_callback
    self, cb_event=(cb, event))
  File "D:\Python 35\lib\site-packages\vispy\util\logs.py", line 323, in _handle
_exception
    logger.log_exception()
  File "D:\Python 35\lib\site-packages\vispy\util\logs.py", line 265, in log_exc
eption
    stack = "".join(traceback.format_stack()[:-tb_skip])
  << caught exception here: >>
  File "D:\Python 35\lib\site-packages\vispy\gloo\gl\_gl2.py", line 116, in glBl
endFuncSeparate
    nativefunc = glBlendFuncSeparate._native
AttributeError: 'function' object has no attribute '_native'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "D:\Python 35\lib\site-packages\vispy\gloo\gl\gl2.py", line 72, in _get_g
l_func
    func = getattr(_lib, name)
  File "D:\Python 35\lib\ctypes\__init__.py", line 360, in __getattr__
    func = self.__getitem__(name)
  File "D:\Python 35\lib\ctypes\__init__.py", line 365, in __getitem__
    func = self._FuncPtr((name_or_ordinal, self))
AttributeError: function 'glBlendFuncSeparate' not found

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "D:\Python 35\lib\site-packages\vispy\util\event.py", line 471, in _invok
e_callback
    cb(event)
  File "D:\Python 35\lib\site-packages\vispy\gloo\context.py", line 171, in flus
h_commands
    self.glir.flush(self.shared.parser)
  File "D:\Python 35\lib\site-packages\vispy\gloo\glir.py", line 232, in flush
    self._shared.flush(parser)
  File "D:\Python 35\lib\site-packages\vispy\gloo\glir.py", line 146, in flush
    parser.parse(self._filter(self.clear(), parser))
  File "D:\Python 35\lib\site-packages\vispy\gloo\glir.py", line 477, in parse
    self._parse(command)
  File "D:\Python 35\lib\site-packages\vispy\gloo\glir.py", line 410, in _parse
    getattr(gl, id_)(*args)
  File "D:\Python 35\lib\site-packages\vispy\gloo\gl\_gl2.py", line 118, in glBl
endFuncSeparate
    nativefunc = glBlendFuncSeparate._native = _get_gl_func("glBlendFuncSeparate
", None, (ctypes.c_uint, ctypes.c_uint, ctypes.c_uint, ctypes.c_uint,))
  File "D:\Python 35\lib\site-packages\vispy\gloo\gl\gl2.py", line 87, in _get_g
l_func
    raise RuntimeError('Using %s with no OpenGL context.' % name)
RuntimeError: Using glBlendFuncSeparate with no OpenGL context.
ERROR: Invoking <bound method GLContext.flush_commands of <GLContext at 0xd894e8
0>> for DrawEvent
WARNING: Error drawing visual <vispy.visuals.mesh.MeshVisual object at 0x0000000
015065160>
ERROR: Invoking <bound method SceneCanvas.on_draw of <SceneCanvas (PyQt5) at 0x6
d145f8>> repeat 2
ERROR: Invoking <bound method GLContext.flush_commands of <GLContext at 0xd894e8
0>> repeat 2
WARNING: Error drawing visual <vispy.visuals.mesh.MeshVisual object at 0x0000000
015065160>
WARNING: Error drawing visual <vispy.visuals.mesh.MeshVisual object at 0x0000000
015065160>
ERROR: Invoking <bound method SceneCanvas.on_draw of <SceneCanvas (PyQt5) at 0x6
d145f8>> repeat 4
ERROR: Invoking <bound method GLContext.flush_commands of <GLContext at 0xd894e8
0>> repeat 4
WARNING: Error drawing visual <vispy.visuals.mesh.MeshVisual object at 0x0000000
015065160>
WARNING: Error drawing visual <vispy.visuals.mesh.MeshVisual object at 0x0000000
015065160>
WARNING: Error drawing visual <vispy.visuals.mesh.MeshVisual object at 0x0000000
015065160>
WARNING: Error drawing visual <vispy.visuals.mesh.MeshVisual object at 0x0000000
015065160>
ERROR: Invoking <bound method SceneCanvas.on_draw of <SceneCanvas (PyQt5) at 0x6
d145f8>> repeat 8
ERROR: Invoking <bound method GLContext.flush_commands of <GLContext at 0xd894e8
0>> repeat 8
WARNING: Error drawing visual <vispy.visuals.mesh.MeshVisual object at 0x0000000
015065160>
WARNING: Error drawing visual <vispy.visuals.mesh.MeshVisual object at 0x0000000
015065160>
WARNING: Error drawing visual <vispy.visuals.mesh.MeshVisual object at 0x0000000
015065160>
WARNING: Error drawing visual <vispy.visuals.mesh.MeshVisual object at 0x0000000
015065160>
WARNING: Error drawing visual <vispy.visuals.mesh.MeshVisual object at 0x0000000
015065160>
WARNING: Error drawing visual <vispy.visuals.mesh.MeshVisual object at 0x0000000
015065160>
WARNING: Error drawing visual <vispy.visuals.mesh.MeshVisual object at 0x0000000
015065160>
WARNING: Error drawing visual <vispy.visuals.mesh.MeshVisual object at 0x0000000
015065160>
ERROR: Invoking <bound method SceneCanvas.on_draw of <SceneCanvas (PyQt5) at 0x6
d145f8>> repeat 16
ERROR: Invoking <bound method GLContext.flush_commands of <GLContext at 0xd894e8
0>> repeat 16
WARNING: Error drawing visual <vispy.visuals.mesh.MeshVisual object at 0x0000000
015065160>
WARNING: Error drawing visual <vispy.visuals.mesh.MeshVisual object at 0x0000000
015065160>
WARNING: Error drawing visual <vispy.visuals.mesh.MeshVisual object at 0x0000000
015065160>
WARNING: Error drawing visual <vispy.visuals.mesh.MeshVisual object at 0x0000000
015065160>
WARNING: Error drawing visual <vispy.visuals.mesh.MeshVisual object at 0x0000000
015065160>
WARNING: Error drawing visual <vispy.visuals.mesh.MeshVisual object at 0x0000000
015065160>
WARNING: Error drawing visual <vispy.visuals.mesh.MeshVisual object at 0x0000000
015065160>
WARNING: Error drawing visual <vispy.visuals.mesh.MeshVisual object at 0x0000000
015065160>
WARNING: Error drawing visual <vispy.visuals.mesh.MeshVisual object at 0x0000000
015065160>
WARNING: Error drawing visual <vispy.visuals.mesh.MeshVisual object at 0x0000000
015065160>

from visbrain.

sbhadr avatar sbhadr commented on May 18, 2024

Typically, this means that your setup tools are outdated. To update them, run the following in cmd prompt(elevated/administrator mode)(assuming that you allowed Python to add itself to your PATH):
pip install --upgrade setuptools

Then you can do:
pip install visbrain

If all else fails, you can try to do:
pip install --upgrade setuptools --user python
and then:
pip install visbrain

from visbrain.

STREETKILLER007 avatar STREETKILLER007 commented on May 18, 2024

i installed visbrain.
Setuptool is also up to date.

from visbrain.

sbhadr avatar sbhadr commented on May 18, 2024

Has the issue been solved?

from visbrain.

STREETKILLER007 avatar STREETKILLER007 commented on May 18, 2024

In the beginning, after i installed python 3.5 in my environment, i typed pip install visbrain in cmd.

It will tell me to update setuptools.

After i typed pip install --upgrade setuptools, i typed pip install visbrain.

Visbrain installed successfully.

Qtwindows error has not been solve until now.

from visbrain.

STREETKILLER007 avatar STREETKILLER007 commented on May 18, 2024

according to stack over flow link and qt forum, i simply tried to add 1 line on the code

from visbrain import Topo

# Create a topoplot instance :
t = Topo()

# Create a list of channels, data, title and colorbar label :
name = 'Topo_1'
channels = ['C3', 'C4', 'Cz', 'Fz', 'Pz']
data = [10, 20, 30, 10, 10]
title = 'Basic topoplot illustration'
cblabel = 'Colorbar label'

# Add a central topoplot :
t.add_topoplot(name, data, channels=channels, title=title, cblabel=cblabel)

# Show the window :
t.setGeometry(200,200,200,200)
t.show()

qtwindows is solved
but now it pops out this error...

according to vispy, it said that opengl version must be at least 2.1.
my opengl version is 3.1

WARNING: Error drawing visual <vispy.visuals.mesh.MeshVisual object at 0x000000000FB288D0>
WARNING: Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "D:\Python 35\lib\idlelib\run.py", line 124, in main
    ret = method(*args, **kwargs)
  File "D:\Python 35\lib\idlelib\run.py", line 351, in runcode
    exec(code, self.locals)
  File "C:\Users\JamesTan\Desktop\testtopofull.py", line 18, in <module>
    t.show()
  File "D:\Python 35\lib\site-packages\visbrain\pyqt_module.py", line 106, in show
    CONFIG['VISPY_APP'].run()
  File "D:\Python 35\lib\site-packages\vispy\app\application.py", line 142, in run
    return self._backend._vispy_run()
  File "D:\Python 35\lib\site-packages\vispy\app\backends\_qt.py", line 229, in _vispy_run
    return app.exec_()
  File "D:\Python 35\lib\site-packages\vispy\app\backends\_qt.py", line 436, in event
    out = super(QtBaseCanvasBackend, self).event(ev)
  File "D:\Python 35\lib\site-packages\vispy\app\backends\_qt.py", line 708, in paintGL
    self._vispy_canvas.events.draw(region=None)
  File "D:\Python 35\lib\site-packages\vispy\util\event.py", line 455, in __call__
    self._invoke_callback(cb, event)
  File "D:\Python 35\lib\site-packages\vispy\util\event.py", line 475, in _invoke_callback
    self, cb_event=(cb, event))
  File "D:\Python 35\lib\site-packages\vispy\util\logs.py", line 323, in _handle_exception
    logger.log_exception()
  File "D:\Python 35\lib\site-packages\vispy\util\logs.py", line 265, in log_exception
    stack = "".join(traceback.format_stack()[:-tb_skip])
  << caught exception here: >>
  File "D:\Python 35\lib\site-packages\vispy\util\event.py", line 471, in _invoke_callback
    cb(event)
  File "D:\Python 35\lib\site-packages\vispy\scene\canvas.py", line 207, in on_draw
    self._draw_scene()
  File "D:\Python 35\lib\site-packages\vispy\scene\canvas.py", line 253, in _draw_scene
    self.draw_visual(self.scene)
  File "D:\Python 35\lib\site-packages\vispy\scene\canvas.py", line 291, in draw_visual
    node.draw()
  File "D:\Python 35\lib\site-packages\vispy\scene\visuals.py", line 98, in draw
    self._visual_superclass.draw(self)
  File "D:\Python 35\lib\site-packages\vispy\visuals\visual.py", line 588, in draw
    v.draw()
  File "D:\Python 35\lib\site-packages\vispy\visuals\mesh.py", line 517, in draw
    Visual.draw(self, *args, **kwds)
  File "D:\Python 35\lib\site-packages\vispy\visuals\visual.py", line 440, in draw
    self._vshare.index_buffer)
  File "D:\Python 35\lib\site-packages\vispy\visuals\shaders\program.py", line 77, in draw
    Program.draw(self, *args, **kwargs)
  File "D:\Python 35\lib\site-packages\vispy\gloo\program.py", line 470, in draw
    canvas.context.flush_commands()
  File "D:\Python 35\lib\site-packages\vispy\gloo\context.py", line 170, in flush_commands
    self.shared.parser.parse([('CURRENT', 0)])
  File "D:\Python 35\lib\site-packages\vispy\gloo\glir.py", line 477, in parse
    self._parse(command)
  File "D:\Python 35\lib\site-packages\vispy\gloo\glir.py", line 404, in _parse
    self._gl_initialize()
  File "D:\Python 35\lib\site-packages\vispy\gloo\glir.py", line 502, in _gl_initialize
    if this_version < '2.1':
  File "D:\Python 35\lib\distutils\version.py", line 52, in __lt__
    c = self._cmp(other)
  File "D:\Python 35\lib\distutils\version.py", line 335, in _cmp
    if self.version == other.version:
AttributeError: 'LooseVersion' object has no attribute 'version'
ERROR: Invoking <bound method SceneCanvas.on_draw of <SceneCanvas (PyQt5) at 0xe13bda0>> for DrawEvent
WARNING: Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "D:\Python 35\lib\idlelib\run.py", line 124, in main
    ret = method(*args, **kwargs)
  File "D:\Python 35\lib\idlelib\run.py", line 351, in runcode
    exec(code, self.locals)
  File "C:\Users\JamesTan\Desktop\testtopofull.py", line 18, in <module>
    t.show()
  File "D:\Python 35\lib\site-packages\visbrain\pyqt_module.py", line 106, in show
    CONFIG['VISPY_APP'].run()
  File "D:\Python 35\lib\site-packages\vispy\app\application.py", line 142, in run
    return self._backend._vispy_run()
  File "D:\Python 35\lib\site-packages\vispy\app\backends\_qt.py", line 229, in _vispy_run
    return app.exec_()
  File "D:\Python 35\lib\site-packages\vispy\app\backends\_qt.py", line 436, in event
    out = super(QtBaseCanvasBackend, self).event(ev)
  File "D:\Python 35\lib\site-packages\vispy\app\backends\_qt.py", line 708, in paintGL
    self._vispy_canvas.events.draw(region=None)
  File "D:\Python 35\lib\site-packages\vispy\util\event.py", line 455, in __call__
    self._invoke_callback(cb, event)
  File "D:\Python 35\lib\site-packages\vispy\util\event.py", line 475, in _invoke_callback
    self, cb_event=(cb, event))
  File "D:\Python 35\lib\site-packages\vispy\util\logs.py", line 323, in _handle_exception
    logger.log_exception()
  File "D:\Python 35\lib\site-packages\vispy\util\logs.py", line 265, in log_exception
    stack = "".join(traceback.format_stack()[:-tb_skip])
  << caught exception here: >>
  File "D:\Python 35\lib\site-packages\vispy\gloo\gl\_gl2.py", line 116, in glBlendFuncSeparate
    nativefunc = glBlendFuncSeparate._native
AttributeError: 'function' object has no attribute '_native'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "D:\Python 35\lib\site-packages\vispy\gloo\gl\gl2.py", line 72, in _get_gl_func
    func = getattr(_lib, name)
  File "D:\Python 35\lib\ctypes\__init__.py", line 360, in __getattr__
    func = self.__getitem__(name)
  File "D:\Python 35\lib\ctypes\__init__.py", line 365, in __getitem__
    func = self._FuncPtr((name_or_ordinal, self))
AttributeError: function 'glBlendFuncSeparate' not found

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "D:\Python 35\lib\site-packages\vispy\util\event.py", line 471, in _invoke_callback
    cb(event)
  File "D:\Python 35\lib\site-packages\vispy\gloo\context.py", line 171, in flush_commands
    self.glir.flush(self.shared.parser)
  File "D:\Python 35\lib\site-packages\vispy\gloo\glir.py", line 232, in flush
    self._shared.flush(parser)
  File "D:\Python 35\lib\site-packages\vispy\gloo\glir.py", line 146, in flush
    parser.parse(self._filter(self.clear(), parser))
  File "D:\Python 35\lib\site-packages\vispy\gloo\glir.py", line 477, in parse
    self._parse(command)
  File "D:\Python 35\lib\site-packages\vispy\gloo\glir.py", line 410, in _parse
    getattr(gl, id_)(*args)
  File "D:\Python 35\lib\site-packages\vispy\gloo\gl\_gl2.py", line 118, in glBlendFuncSeparate
    nativefunc = glBlendFuncSeparate._native = _get_gl_func("glBlendFuncSeparate", None, (ctypes.c_uint, ctypes.c_uint, ctypes.c_uint, ctypes.c_uint,))
  File "D:\Python 35\lib\site-packages\vispy\gloo\gl\gl2.py", line 87, in _get_gl_func
    raise RuntimeError('Using %s with no OpenGL context.' % name)
RuntimeError: Using glBlendFuncSeparate with no OpenGL context.
ERROR: Invoking <bound method GLContext.flush_commands of <GLContext at 0xf1316a0>> for DrawEvent
WARNING: Error drawing visual <vispy.visuals.mesh.MeshVisual object at 0x000000000FB288D0>
ERROR: Invoking <bound method SceneCanvas.on_draw of <SceneCanvas (PyQt5) at 0xe13bda0>> repeat 2
ERROR: Invoking <bound method GLContext.flush_commands of <GLContext at 0xf1316a0>> repeat 2

from visbrain.

EtienneCmb avatar EtienneCmb commented on May 18, 2024

Thx @Sanjay-B for the help,

raise RuntimeError('Using %s with no OpenGL context.' % name) usually pop out when PyQt5 is not properly installed

from visbrain.

sbhadr avatar sbhadr commented on May 18, 2024

Usually when that error occurs, it means that it’s incompatible with the version of Python the developer is trying to develop on.

I’m not entirely sure what dependencies PyQt5 requires and if those are compatible with the current version of Python on said platform. Python doesn’t exactly provide the best error messages. :P

from visbrain.

STREETKILLER007 avatar STREETKILLER007 commented on May 18, 2024

@EtienneCmb i downloaded pyqt5 from the link that i provided and ImportError : DLL load failed: The specified procedure could not be found. solved.
if i type pip install pyqt5, ImportError : DLL load failed: The specified procedure could not be found. will appear.

from visbrain.

STREETKILLER007 avatar STREETKILLER007 commented on May 18, 2024

@Sanjay-B u said :"Usually when that error occurs, it means that it’s incompatible with the version of Python the developer is trying to develop on.". What error do you mean ?

from visbrain.

STREETKILLER007 avatar STREETKILLER007 commented on May 18, 2024

i tried to uninstall pyqt5 on my environment, tried to pip install pyqt5

after that, this error pops out.

testtopo

i tried to update sip

C:\Users\JamesTan>pip install --upgrade sip
Collecting sip
  Downloading https://files.pythonhosted.org/packages/15/75/bf654c02d5df484d8d33
6cb76629d1f651905a0b23f34fcc1853d07fa5a8/sip-4.19.8-cp35-none-win_amd64.whl (51k
B)
    39% |█████████████                   | 20kB 353kB/s eta 0:00:01
    59% |███████████████████             | 30kB 374kB/s eta 0
    79% |█████████████████████████▌      | 40kB 401kB/
    99% |████████████████████████████████| 51kB
    100% |████████████████████████████████| 61kB
 543kB/s
Installing collected packages: sip
Successfully installed sip-4.19.8

it seems that, sip installed successfully.

but the error still the same, which is

Traceback (most recent call last):
  File "C:\Users\JamesTan\Desktop\testtopo.py", line 1, in <module>
    from visbrain import Topo
  File "D:\Python 35\lib\site-packages\visbrain\__init__.py", line 23, in <module>
    from .brain import Brain
  File "D:\Python 35\lib\site-packages\visbrain\brain\__init__.py", line 2, in <module>
    from .brain import Brain
  File "D:\Python 35\lib\site-packages\visbrain\brain\brain.py", line 13, in <module>
    from .interface import UiInit, UiElements, BrainShortcuts
  File "D:\Python 35\lib\site-packages\visbrain\brain\interface\__init__.py", line 2, in <module>
    from .ui_init import UiInit, BrainShortcuts
  File "D:\Python 35\lib\site-packages\visbrain\brain\interface\ui_init.py", line 9, in <module>
    from PyQt5 import QtWidgets
ImportError: No module named 'PyQt5.sip'

from visbrain.

STREETKILLER007 avatar STREETKILLER007 commented on May 18, 2024

ok, i finally solved the ImportError problem.

according to https://blog.csdn.net/qq_41185868/article/details/80903095
it said that Incompatibilities with pyqt5 version and SIP version.
and it said that if sip version is 4.19.8, PyQt5 version have to be 5.10.1.

so what i tried was uninstalled PyQt5 by pip uninstall pyqt5, and installed 5.10.1 version by pip install pyqt5==5.10.1

the result is as below.

capture

below is result for my current pip list

C:\Users\JamesTan>pip list
Package         Version
--------------- -------
click           6.7
cycler          0.10.0
kiwisolver      1.0.1
matplotlib      2.1.0
numpy           1.15.0
Pillow          5.2.0
pip             18.0
pyparsing       2.2.0
PyQt5           5.10.1
PyQt5-sip       4.19.12
python-dateutil 2.7.3
pytz            2018.5
scipy           1.1.0
setuptools      40.0.0
sip             4.19.8
six             1.11.0
visbrain        0.4.2
vispy           0.5.3
wheel           0.31.1

from visbrain.

STREETKILLER007 avatar STREETKILLER007 commented on May 18, 2024

finally this is still the head pain part.

i tried to run

from visbrain import Topo

# Create a topoplot instance :
t = Topo()

# Create a list of channels, data, title and colorbar label :
name = 'Topo_1'
channels = ['C3', 'C4', 'Cz', 'Fz', 'Pz']
data = [10, 20, 30, 10, 10]
title = 'Basic topoplot illustration'
cblabel = 'Colorbar label'

# Add a central topoplot :
t.add_topoplot(name, data, channels=channels, title=title, cblabel=cblabel)

# Show the window :
t.setGeometry(200,200,200,200)
t.show()

it still pops out this long error.

WARNING: Error drawing visual <vispy.visuals.mesh.MeshVisual object at 0x00000000163E18D0>
WARNING: Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "D:\Python 35\lib\idlelib\run.py", line 124, in main
    ret = method(*args, **kwargs)
  File "D:\Python 35\lib\idlelib\run.py", line 351, in runcode
    exec(code, self.locals)
  File "C:\Users\JamesTan\Desktop\testtopofull.py", line 18, in <module>
    t.show()
  File "D:\Python 35\lib\site-packages\visbrain\pyqt_module.py", line 106, in show
    CONFIG['VISPY_APP'].run()
  File "D:\Python 35\lib\site-packages\vispy\app\application.py", line 142, in run
    return self._backend._vispy_run()
  File "D:\Python 35\lib\site-packages\vispy\app\backends\_qt.py", line 229, in _vispy_run
    return app.exec_()
  File "D:\Python 35\lib\site-packages\vispy\app\backends\_qt.py", line 436, in event
    out = super(QtBaseCanvasBackend, self).event(ev)
  File "D:\Python 35\lib\site-packages\vispy\app\backends\_qt.py", line 708, in paintGL
    self._vispy_canvas.events.draw(region=None)
  File "D:\Python 35\lib\site-packages\vispy\util\event.py", line 455, in __call__
    self._invoke_callback(cb, event)
  File "D:\Python 35\lib\site-packages\vispy\util\event.py", line 475, in _invoke_callback
    self, cb_event=(cb, event))
  File "D:\Python 35\lib\site-packages\vispy\util\logs.py", line 323, in _handle_exception
    logger.log_exception()
  File "D:\Python 35\lib\site-packages\vispy\util\logs.py", line 265, in log_exception
    stack = "".join(traceback.format_stack()[:-tb_skip])
  << caught exception here: >>
  File "D:\Python 35\lib\site-packages\vispy\util\event.py", line 471, in _invoke_callback
    cb(event)
  File "D:\Python 35\lib\site-packages\vispy\scene\canvas.py", line 207, in on_draw
    self._draw_scene()
  File "D:\Python 35\lib\site-packages\vispy\scene\canvas.py", line 253, in _draw_scene
    self.draw_visual(self.scene)
  File "D:\Python 35\lib\site-packages\vispy\scene\canvas.py", line 291, in draw_visual
    node.draw()
  File "D:\Python 35\lib\site-packages\vispy\scene\visuals.py", line 98, in draw
    self._visual_superclass.draw(self)
  File "D:\Python 35\lib\site-packages\vispy\visuals\visual.py", line 588, in draw
    v.draw()
  File "D:\Python 35\lib\site-packages\vispy\visuals\mesh.py", line 517, in draw
    Visual.draw(self, *args, **kwds)
  File "D:\Python 35\lib\site-packages\vispy\visuals\visual.py", line 440, in draw
    self._vshare.index_buffer)
  File "D:\Python 35\lib\site-packages\vispy\visuals\shaders\program.py", line 77, in draw
    Program.draw(self, *args, **kwargs)
  File "D:\Python 35\lib\site-packages\vispy\gloo\program.py", line 470, in draw
    canvas.context.flush_commands()
  File "D:\Python 35\lib\site-packages\vispy\gloo\context.py", line 170, in flush_commands
    self.shared.parser.parse([('CURRENT', 0)])
  File "D:\Python 35\lib\site-packages\vispy\gloo\glir.py", line 477, in parse
    self._parse(command)
  File "D:\Python 35\lib\site-packages\vispy\gloo\glir.py", line 404, in _parse
    self._gl_initialize()
  File "D:\Python 35\lib\site-packages\vispy\gloo\glir.py", line 502, in _gl_initialize
    if this_version < '2.1':
  File "D:\Python 35\lib\distutils\version.py", line 52, in __lt__
    c = self._cmp(other)
  File "D:\Python 35\lib\distutils\version.py", line 335, in _cmp
    if self.version == other.version:
AttributeError: 'LooseVersion' object has no attribute 'version'
ERROR: Invoking <bound method SceneCanvas.on_draw of <SceneCanvas (PyQt5) at 0xeb5df28>> for DrawEvent
WARNING: Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "D:\Python 35\lib\idlelib\run.py", line 124, in main
    ret = method(*args, **kwargs)
  File "D:\Python 35\lib\idlelib\run.py", line 351, in runcode
    exec(code, self.locals)
  File "C:\Users\JamesTan\Desktop\testtopofull.py", line 18, in <module>
    t.show()
  File "D:\Python 35\lib\site-packages\visbrain\pyqt_module.py", line 106, in show
    CONFIG['VISPY_APP'].run()
  File "D:\Python 35\lib\site-packages\vispy\app\application.py", line 142, in run
    return self._backend._vispy_run()
  File "D:\Python 35\lib\site-packages\vispy\app\backends\_qt.py", line 229, in _vispy_run
    return app.exec_()
  File "D:\Python 35\lib\site-packages\vispy\app\backends\_qt.py", line 436, in event
    out = super(QtBaseCanvasBackend, self).event(ev)
  File "D:\Python 35\lib\site-packages\vispy\app\backends\_qt.py", line 708, in paintGL
    self._vispy_canvas.events.draw(region=None)
  File "D:\Python 35\lib\site-packages\vispy\util\event.py", line 455, in __call__
    self._invoke_callback(cb, event)
  File "D:\Python 35\lib\site-packages\vispy\util\event.py", line 475, in _invoke_callback
    self, cb_event=(cb, event))
  File "D:\Python 35\lib\site-packages\vispy\util\logs.py", line 323, in _handle_exception
    logger.log_exception()
  File "D:\Python 35\lib\site-packages\vispy\util\logs.py", line 265, in log_exception
    stack = "".join(traceback.format_stack()[:-tb_skip])
  << caught exception here: >>
  File "D:\Python 35\lib\site-packages\vispy\gloo\gl\_gl2.py", line 116, in glBlendFuncSeparate
    nativefunc = glBlendFuncSeparate._native
AttributeError: 'function' object has no attribute '_native'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "D:\Python 35\lib\site-packages\vispy\gloo\gl\gl2.py", line 72, in _get_gl_func
    func = getattr(_lib, name)
  File "D:\Python 35\lib\ctypes\__init__.py", line 360, in __getattr__
    func = self.__getitem__(name)
  File "D:\Python 35\lib\ctypes\__init__.py", line 365, in __getitem__
    func = self._FuncPtr((name_or_ordinal, self))
AttributeError: function 'glBlendFuncSeparate' not found

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "D:\Python 35\lib\site-packages\vispy\util\event.py", line 471, in _invoke_callback
    cb(event)
  File "D:\Python 35\lib\site-packages\vispy\gloo\context.py", line 171, in flush_commands
    self.glir.flush(self.shared.parser)
  File "D:\Python 35\lib\site-packages\vispy\gloo\glir.py", line 232, in flush
    self._shared.flush(parser)
  File "D:\Python 35\lib\site-packages\vispy\gloo\glir.py", line 146, in flush
    parser.parse(self._filter(self.clear(), parser))
  File "D:\Python 35\lib\site-packages\vispy\gloo\glir.py", line 477, in parse
    self._parse(command)
  File "D:\Python 35\lib\site-packages\vispy\gloo\glir.py", line 410, in _parse
    getattr(gl, id_)(*args)
  File "D:\Python 35\lib\site-packages\vispy\gloo\gl\_gl2.py", line 118, in glBlendFuncSeparate
    nativefunc = glBlendFuncSeparate._native = _get_gl_func("glBlendFuncSeparate", None, (ctypes.c_uint, ctypes.c_uint, ctypes.c_uint, ctypes.c_uint,))
  File "D:\Python 35\lib\site-packages\vispy\gloo\gl\gl2.py", line 87, in _get_gl_func
    raise RuntimeError('Using %s with no OpenGL context.' % name)
RuntimeError: Using glBlendFuncSeparate with no OpenGL context.
ERROR: Invoking <bound method GLContext.flush_commands of <GLContext at 0xfb827f0>> for DrawEvent
WARNING: Error drawing visual <vispy.visuals.mesh.MeshVisual object at 0x00000000163E18D0>
ERROR: Invoking <bound method SceneCanvas.on_draw of <SceneCanvas (PyQt5) at 0xeb5df28>> repeat 2
ERROR: Invoking <bound method GLContext.flush_commands of <GLContext at 0xfb827f0>> repeat 2
WARNING: Error drawing visual <vispy.visuals.mesh.MeshVisual object at 0x00000000163E18D0>
WARNING: Error drawing visual <vispy.visuals.mesh.MeshVisual object at 0x00000000163E18D0>
ERROR: Invoking <bound method SceneCanvas.on_draw of <SceneCanvas (PyQt5) at 0xeb5df28>> repeat 4
ERROR: Invoking <bound method GLContext.flush_commands of <GLContext at 0xfb827f0>> repeat 4
WARNING: Error drawing visual <vispy.visuals.mesh.MeshVisual object at 0x00000000163E18D0>
WARNING: Error drawing visual <vispy.visuals.mesh.MeshVisual object at 0x00000000163E18D0>
WARNING: Error drawing visual <vispy.visuals.mesh.MeshVisual object at 0x00000000163E18D0>
WARNING: Error drawing visual <vispy.visuals.mesh.MeshVisual object at 0x00000000163E18D0>
ERROR: Invoking <bound method SceneCanvas.on_draw of <SceneCanvas (PyQt5) at 0xeb5df28>> repeat 8
ERROR: Invoking <bound method GLContext.flush_commands of <GLContext at 0xfb827f0>> repeat 8
WARNING: Error drawing visual <vispy.visuals.mesh.MeshVisual object at 0x00000000163E18D0>
WARNING: Error drawing visual <vispy.visuals.mesh.MeshVisual object at 0x00000000163E18D0>

from visbrain.

STREETKILLER007 avatar STREETKILLER007 commented on May 18, 2024

in my Anaconda3 environment, i am using python 3.6.

pip list of the environment.

(myenv3604) C:\Users\JamesTan>pip list
Package         Version
--------------- ---------
certifi         2018.4.16
click           6.7
cycler          0.10.0
kiwisolver      1.0.1
matplotlib      2.2.0
mkl-fft         1.0.4
mkl-random      1.0.1
numpy           1.15.0
Pillow          5.2.0
pip             18.0
pyparsing       2.2.0
PyQt5           5.11.2
PyQt5-sip       4.19.12
python-dateutil 2.7.3
pytz            2018.5
scipy           1.1.0
setuptools      40.0.0
six             1.11.0
visbrain        0.4.2
vispy           0.5.3
wheel           0.31.1
wincertstore    0.2

tried to run testtopo.py, which is

from visbrain import Topo

# Create a topoplot instance :
t = Topo()

the compatible error occured, forced to me to use matplotlib 2.1.0

(myenv3604) C:\Users\JamesTan\Desktop>python testtopo.py
D:\Anaconda3\envs\myenv3604\lib\site-packages\vispy\visuals\isocurve.py:22: User
Warning: VisPy is not yet compatible with matplotlib 2.2+
  warnings.warn("VisPy is not yet compatible with matplotlib 2.2+")

from visbrain.

STREETKILLER007 avatar STREETKILLER007 commented on May 18, 2024

When i typed pip install --upgrade pyqt5 or pip install --upgrade matplotlib==2.2.0, i saw these 2 red line, wondering will them affect Visbrain.

mkl-random 1.0.1 requires cython, which is not installed.
mkl-fft 1.0.4 requires cython, which is not installed.

I try to install vispy latest version, hope it helps.

from visbrain.

STREETKILLER007 avatar STREETKILLER007 commented on May 18, 2024

tried pip list again.

it is still the same.

(myenv3604) C:\Users\JamesTan>pip list
Package         Version
--------------- ---------
certifi         2018.4.16
click           6.7
cycler          0.10.0
kiwisolver      1.0.1
matplotlib      2.2.0
mkl-fft         1.0.4
mkl-random      1.0.1
numpy           1.15.0
Pillow          5.2.0
pip             18.0
pyparsing       2.2.0
PyQt5           5.11.2
PyQt5-sip       4.19.12
python-dateutil 2.7.3
pytz            2018.5
scipy           1.1.0
setuptools      40.0.0
six             1.11.0
visbrain        0.4.2
vispy           0.5.3
wheel           0.31.1
wincertstore    0.2

Vispy is in latest version. They are trying to solve VisPy is not yet compatible with matplotlib 2.2+ as you said.
reference : http://vispy.org/releasenotes.html

PyQt5 is in latest version.
reference : https://pypi.org/project/PyQt5/

I upgraded PyQt5 just now because i downgraded PyQt5 to 5.10.1.

Tried Topo, it still pops out this error.

(myenv3604) C:\Users\JamesTan\Desktop>python testtopofull.py
D:\Anaconda3\envs\myenv3604\lib\site-packages\vispy\visuals\isocurve.py:22: User
Warning: VisPy is not yet compatible with matplotlib 2.2+
  warnings.warn("VisPy is not yet compatible with matplotlib 2.2+")
WARNING: Error drawing visual <vispy.visuals.mesh.MeshVisual object at 0x0000000
013B3B208>
WARNING: Traceback (most recent call last):
  File "testtopofull.py", line 18, in <module>
    t.show()
  File "D:\Anaconda3\envs\myenv3604\lib\site-packages\visbrain\pyqt_module.py",
line 106, in show
    CONFIG['VISPY_APP'].run()
  File "D:\Anaconda3\envs\myenv3604\lib\site-packages\vispy\app\application.py",
 line 142, in run
    return self._backend._vispy_run()
  File "D:\Anaconda3\envs\myenv3604\lib\site-packages\vispy\app\backends\_qt.py"
, line 229, in _vispy_run
    return app.exec_()
  File "D:\Anaconda3\envs\myenv3604\lib\site-packages\vispy\app\backends\_qt.py"
, line 436, in event
    out = super(QtBaseCanvasBackend, self).event(ev)
  File "D:\Anaconda3\envs\myenv3604\lib\site-packages\vispy\app\backends\_qt.py"
, line 708, in paintGL
    self._vispy_canvas.events.draw(region=None)
  File "D:\Anaconda3\envs\myenv3604\lib\site-packages\vispy\util\event.py", line
 455, in __call__
    self._invoke_callback(cb, event)
  File "D:\Anaconda3\envs\myenv3604\lib\site-packages\vispy\util\event.py", line
 475, in _invoke_callback
    self, cb_event=(cb, event))
  << caught exception here: >>
  File "D:\Anaconda3\envs\myenv3604\lib\site-packages\vispy\util\event.py", line
 471, in _invoke_callback
    cb(event)
  File "D:\Anaconda3\envs\myenv3604\lib\site-packages\vispy\scene\canvas.py", li
ne 207, in on_draw
    self._draw_scene()
  File "D:\Anaconda3\envs\myenv3604\lib\site-packages\vispy\scene\canvas.py", li
ne 253, in _draw_scene
    self.draw_visual(self.scene)
  File "D:\Anaconda3\envs\myenv3604\lib\site-packages\vispy\scene\canvas.py", li
ne 291, in draw_visual
    node.draw()
  File "D:\Anaconda3\envs\myenv3604\lib\site-packages\vispy\scene\visuals.py", l
ine 98, in draw
    self._visual_superclass.draw(self)
  File "D:\Anaconda3\envs\myenv3604\lib\site-packages\vispy\visuals\visual.py",
line 588, in draw
    v.draw()
  File "D:\Anaconda3\envs\myenv3604\lib\site-packages\vispy\visuals\mesh.py", li
ne 517, in draw
    Visual.draw(self, *args, **kwds)
  File "D:\Anaconda3\envs\myenv3604\lib\site-packages\vispy\visuals\visual.py",
line 440, in draw
    self._vshare.index_buffer)
  File "D:\Anaconda3\envs\myenv3604\lib\site-packages\vispy\visuals\shaders\prog
ram.py", line 77, in draw
    Program.draw(self, *args, **kwargs)
  File "D:\Anaconda3\envs\myenv3604\lib\site-packages\vispy\gloo\program.py", li
ne 470, in draw
    canvas.context.flush_commands()
  File "D:\Anaconda3\envs\myenv3604\lib\site-packages\vispy\gloo\context.py", li
ne 170, in flush_commands
    self.shared.parser.parse([('CURRENT', 0)])
  File "D:\Anaconda3\envs\myenv3604\lib\site-packages\vispy\gloo\glir.py", line
477, in parse
    self._parse(command)
  File "D:\Anaconda3\envs\myenv3604\lib\site-packages\vispy\gloo\glir.py", line
404, in _parse
    self._gl_initialize()
  File "D:\Anaconda3\envs\myenv3604\lib\site-packages\vispy\gloo\glir.py", line
502, in _gl_initialize
    if this_version < '2.1':
  File "D:\Anaconda3\envs\myenv3604\lib\distutils\version.py", line 52, in __lt_
_
    c = self._cmp(other)
  File "D:\Anaconda3\envs\myenv3604\lib\distutils\version.py", line 335, in _cmp

    if self.version == other.version:
AttributeError: 'LooseVersion' object has no attribute 'version'
ERROR: Invoking <bound method SceneCanvas.on_draw of <SceneCanvas (PyQt5) at 0xb
2e76a0>> for DrawEvent
WARNING: Traceback (most recent call last):
  File "testtopofull.py", line 18, in <module>
    t.show()
  File "D:\Anaconda3\envs\myenv3604\lib\site-packages\visbrain\pyqt_module.py",
line 106, in show
    CONFIG['VISPY_APP'].run()
  File "D:\Anaconda3\envs\myenv3604\lib\site-packages\vispy\app\application.py",
 line 142, in run
    return self._backend._vispy_run()
  File "D:\Anaconda3\envs\myenv3604\lib\site-packages\vispy\app\backends\_qt.py"
, line 229, in _vispy_run
    return app.exec_()
  File "D:\Anaconda3\envs\myenv3604\lib\site-packages\vispy\app\backends\_qt.py"
, line 436, in event
    out = super(QtBaseCanvasBackend, self).event(ev)
  File "D:\Anaconda3\envs\myenv3604\lib\site-packages\vispy\app\backends\_qt.py"
, line 708, in paintGL
    self._vispy_canvas.events.draw(region=None)
  File "D:\Anaconda3\envs\myenv3604\lib\site-packages\vispy\util\event.py", line
 455, in __call__
    self._invoke_callback(cb, event)
  File "D:\Anaconda3\envs\myenv3604\lib\site-packages\vispy\util\event.py", line
 475, in _invoke_callback
    self, cb_event=(cb, event))
  << caught exception here: >>
  File "D:\Anaconda3\envs\myenv3604\lib\site-packages\vispy\gloo\gl\_gl2.py", li
ne 116, in glBlendFuncSeparate
    nativefunc = glBlendFuncSeparate._native
AttributeError: 'function' object has no attribute '_native'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "D:\Anaconda3\envs\myenv3604\lib\site-packages\vispy\gloo\gl\gl2.py", lin
e 72, in _get_gl_func
    func = getattr(_lib, name)
  File "D:\Anaconda3\envs\myenv3604\lib\ctypes\__init__.py", line 364, in __geta
ttr__
    func = self.__getitem__(name)
  File "D:\Anaconda3\envs\myenv3604\lib\ctypes\__init__.py", line 369, in __geti
tem__
    func = self._FuncPtr((name_or_ordinal, self))
AttributeError: function 'glBlendFuncSeparate' not found

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "D:\Anaconda3\envs\myenv3604\lib\site-packages\vispy\util\event.py", line
 471, in _invoke_callback
    cb(event)
  File "D:\Anaconda3\envs\myenv3604\lib\site-packages\vispy\gloo\context.py", li
ne 171, in flush_commands
    self.glir.flush(self.shared.parser)
  File "D:\Anaconda3\envs\myenv3604\lib\site-packages\vispy\gloo\glir.py", line
232, in flush
    self._shared.flush(parser)
  File "D:\Anaconda3\envs\myenv3604\lib\site-packages\vispy\gloo\glir.py", line
146, in flush
    parser.parse(self._filter(self.clear(), parser))
  File "D:\Anaconda3\envs\myenv3604\lib\site-packages\vispy\gloo\glir.py", line
477, in parse
    self._parse(command)
  File "D:\Anaconda3\envs\myenv3604\lib\site-packages\vispy\gloo\glir.py", line
410, in _parse
    getattr(gl, id_)(*args)
  File "D:\Anaconda3\envs\myenv3604\lib\site-packages\vispy\gloo\gl\_gl2.py", li
ne 118, in glBlendFuncSeparate
    nativefunc = glBlendFuncSeparate._native = _get_gl_func("glBlendFuncSeparate
", None, (ctypes.c_uint, ctypes.c_uint, ctypes.c_uint, ctypes.c_uint,))
  File "D:\Anaconda3\envs\myenv3604\lib\site-packages\vispy\gloo\gl\gl2.py", lin
e 87, in _get_gl_func
    raise RuntimeError('Using %s with no OpenGL context.' % name)
RuntimeError: Using glBlendFuncSeparate with no OpenGL context.
ERROR: Invoking <bound method GLContext.flush_commands of <GLContext at 0xb2ffeb
8>> for DrawEvent
WARNING: Error drawing visual <vispy.visuals.mesh.MeshVisual object at 0x0000000
013B3B208>
ERROR: Invoking <bound method SceneCanvas.on_draw of <SceneCanvas (PyQt5) at 0xb
2e76a0>> repeat 2
ERROR: Invoking <bound method GLContext.flush_commands of <GLContext at 0xb2ffeb
8>> repeat 2
WARNING: Error drawing visual <vispy.visuals.mesh.MeshVisual object at 0x0000000
013B3B208>

from visbrain.

EtienneCmb avatar EtienneCmb commented on May 18, 2024

Ok, for now, forget about the latest vispy version and compatibility with matplotlib. Vispy example is still working?

from visbrain.

STREETKILLER007 avatar STREETKILLER007 commented on May 18, 2024

tried this example https://github.com/vispy/vispy/blob/master/examples/basics/gloo/display_lines.py
under Visbrain.

It pops out this error.

WARNING: Traceback (most recent call last):
  File "displayline.py", line 128, in <module>
    app.run()
  File "D:\Anaconda3\envs\myenv3604\lib\site-packages\vispy\app\_default_app.py"
, line 62, in run
    return default_app.run()
  File "D:\Anaconda3\envs\myenv3604\lib\site-packages\vispy\app\application.py",
 line 142, in run
    return self._backend._vispy_run()
  File "D:\Anaconda3\envs\myenv3604\lib\site-packages\vispy\app\backends\_qt.py"
, line 229, in _vispy_run
    return app.exec_()
  File "D:\Anaconda3\envs\myenv3604\lib\site-packages\vispy\app\backends\_qt.py"
, line 436, in event
    out = super(QtBaseCanvasBackend, self).event(ev)
  File "D:\Anaconda3\envs\myenv3604\lib\site-packages\vispy\app\backends\_qt.py"
, line 708, in paintGL
    self._vispy_canvas.events.draw(region=None)
  File "D:\Anaconda3\envs\myenv3604\lib\site-packages\vispy\util\event.py", line
 455, in __call__
    self._invoke_callback(cb, event)
  File "D:\Anaconda3\envs\myenv3604\lib\site-packages\vispy\util\event.py", line
 475, in _invoke_callback
    self, cb_event=(cb, event))
  << caught exception here: >>
  File "D:\Anaconda3\envs\myenv3604\lib\site-packages\vispy\util\event.py", line
 471, in _invoke_callback
    cb(event)
  File "displayline.py", line 123, in on_draw
    self.program.draw('line_strip')
  File "D:\Anaconda3\envs\myenv3604\lib\site-packages\vispy\gloo\program.py", li
ne 470, in draw
    canvas.context.flush_commands()
  File "D:\Anaconda3\envs\myenv3604\lib\site-packages\vispy\gloo\context.py", li
ne 170, in flush_commands
    self.shared.parser.parse([('CURRENT', 0)])
  File "D:\Anaconda3\envs\myenv3604\lib\site-packages\vispy\gloo\glir.py", line
477, in parse
    self._parse(command)
  File "D:\Anaconda3\envs\myenv3604\lib\site-packages\vispy\gloo\glir.py", line
404, in _parse
    self._gl_initialize()
  File "D:\Anaconda3\envs\myenv3604\lib\site-packages\vispy\gloo\glir.py", line
502, in _gl_initialize
    if this_version < '2.1':
  File "D:\Anaconda3\envs\myenv3604\lib\distutils\version.py", line 52, in __lt_
_
    c = self._cmp(other)
  File "D:\Anaconda3\envs\myenv3604\lib\distutils\version.py", line 335, in _cmp

    if self.version == other.version:
AttributeError: 'LooseVersion' object has no attribute 'version'
ERROR: Invoking <bound method Canvas.on_draw of <Canvas (PyQt5) at 0x12ba160>> f
or DrawEvent
WARNING: Traceback (most recent call last):
  File "displayline.py", line 128, in <module>
    app.run()
  File "D:\Anaconda3\envs\myenv3604\lib\site-packages\vispy\app\_default_app.py"
, line 62, in run
    return default_app.run()
  File "D:\Anaconda3\envs\myenv3604\lib\site-packages\vispy\app\application.py",
 line 142, in run
    return self._backend._vispy_run()
  File "D:\Anaconda3\envs\myenv3604\lib\site-packages\vispy\app\backends\_qt.py"
, line 229, in _vispy_run
    return app.exec_()
  File "D:\Anaconda3\envs\myenv3604\lib\site-packages\vispy\app\backends\_qt.py"
, line 436, in event
    out = super(QtBaseCanvasBackend, self).event(ev)
  File "D:\Anaconda3\envs\myenv3604\lib\site-packages\vispy\app\backends\_qt.py"
, line 708, in paintGL
    self._vispy_canvas.events.draw(region=None)
  File "D:\Anaconda3\envs\myenv3604\lib\site-packages\vispy\util\event.py", line
 455, in __call__
    self._invoke_callback(cb, event)
  File "D:\Anaconda3\envs\myenv3604\lib\site-packages\vispy\util\event.py", line
 475, in _invoke_callback
    self, cb_event=(cb, event))
  << caught exception here: >>
  File "D:\Anaconda3\envs\myenv3604\lib\site-packages\vispy\gloo\gl\_gl2.py", li
ne 116, in glBlendFuncSeparate
    nativefunc = glBlendFuncSeparate._native
AttributeError: 'function' object has no attribute '_native'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "D:\Anaconda3\envs\myenv3604\lib\site-packages\vispy\gloo\gl\gl2.py", lin
e 72, in _get_gl_func
    func = getattr(_lib, name)
  File "D:\Anaconda3\envs\myenv3604\lib\ctypes\__init__.py", line 364, in __geta
ttr__
    func = self.__getitem__(name)
  File "D:\Anaconda3\envs\myenv3604\lib\ctypes\__init__.py", line 369, in __geti
tem__
    func = self._FuncPtr((name_or_ordinal, self))
AttributeError: function 'glBlendFuncSeparate' not found

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "D:\Anaconda3\envs\myenv3604\lib\site-packages\vispy\util\event.py", line
 471, in _invoke_callback
    cb(event)
  File "D:\Anaconda3\envs\myenv3604\lib\site-packages\vispy\gloo\context.py", li
ne 171, in flush_commands
    self.glir.flush(self.shared.parser)
  File "D:\Anaconda3\envs\myenv3604\lib\site-packages\vispy\gloo\glir.py", line
232, in flush
    self._shared.flush(parser)
  File "D:\Anaconda3\envs\myenv3604\lib\site-packages\vispy\gloo\glir.py", line
146, in flush
    parser.parse(self._filter(self.clear(), parser))
  File "D:\Anaconda3\envs\myenv3604\lib\site-packages\vispy\gloo\glir.py", line
477, in parse
    self._parse(command)
  File "D:\Anaconda3\envs\myenv3604\lib\site-packages\vispy\gloo\glir.py", line
410, in _parse
    getattr(gl, id_)(*args)
  File "D:\Anaconda3\envs\myenv3604\lib\site-packages\vispy\gloo\gl\_gl2.py", li
ne 118, in glBlendFuncSeparate
    nativefunc = glBlendFuncSeparate._native = _get_gl_func("glBlendFuncSeparate
", None, (ctypes.c_uint, ctypes.c_uint, ctypes.c_uint, ctypes.c_uint,))
  File "D:\Anaconda3\envs\myenv3604\lib\site-packages\vispy\gloo\gl\gl2.py", lin
e 87, in _get_gl_func
    raise RuntimeError('Using %s with no OpenGL context.' % name)
RuntimeError: Using glBlendFuncSeparate with no OpenGL context.
ERROR: Invoking <bound method GLContext.flush_commands of <GLContext at 0x3860dd
8>> for DrawEvent
ERROR: Invoking <bound method Canvas.on_draw of <Canvas (PyQt5) at 0x12ba160>> r
epeat 2
ERROR: Invoking <bound method GLContext.flush_commands of <GLContext at 0x3860dd
8>> repeat 2
ERROR: Invoking <bound method Canvas.on_draw of <Canvas (PyQt5) at 0x12ba160>> r
epeat 4
ERROR: Invoking <bound method GLContext.flush_commands of <GLContext at 0x3860dd
8>> repeat 4
ERROR: Invoking <bound method Canvas.on_draw of <Canvas (PyQt5) at 0x12ba160>> r
epeat 8
ERROR: Invoking <bound method GLContext.flush_commands of <GLContext at 0x3860dd
8>> repeat 8
ERROR: Invoking <bound method Canvas.on_draw of <Canvas (PyQt5) at 0x12ba160>> r
epeat 16
ERROR: Invoking <bound method GLContext.flush_commands of <GLContext at 0x3860dd
8>> repeat 16
ERROR: Invoking <bound method Canvas.on_draw of <Canvas (PyQt5) at 0x12ba160>> r
epeat 32
ERROR: Invoking <bound method GLContext.flush_commands of <GLContext at 0x3860dd
8>> repeat 32

from visbrain.

EtienneCmb avatar EtienneCmb commented on May 18, 2024

What do you mean "I tried this example [...] under visbrain"? I thought vipy was working? You still have the same backend issue. If you're still stuck with visbrain, I know that mne-python can also plot topo plot. See this for example

from visbrain.

STREETKILLER007 avatar STREETKILLER007 commented on May 18, 2024

"I tried this example [...] under visbrain" mean that i tried https://github.com/vispy/vispy/blob/master/examples/basics/gloo/display_lines.py after i installed Visbrain.

pip list result :

(myenv3604) C:\Users\JamesTan>pip list
Package         Version
--------------- ---------
certifi         2018.4.16
click           6.7
cycler          0.10.0
kiwisolver      1.0.1
matplotlib      2.2.0
mkl-fft         1.0.4
mkl-random      1.0.1
numpy           1.15.0
Pillow          5.2.0
pip             18.0
pyparsing       2.2.0
PyQt5           5.11.2
PyQt5-sip       4.19.12
python-dateutil 2.7.3
pytz            2018.5
scipy           1.1.0
setuptools      40.0.0
six             1.11.0
visbrain        0.4.2
vispy           0.5.3
wheel           0.31.1
wincertstore    0.2

https://github.com/vispy/vispy/blob/master/examples/basics/gloo/display_lines.py example result.

(myenv3604) C:\Users\JamesTan\Desktop>python displayline.py
WARNING: Traceback (most recent call last):
  File "displayline.py", line 128, in <module>
    app.run()
  File "D:\Anaconda3\envs\myenv3604\lib\site-packages\vispy\app\_default_app.py"
, line 62, in run
    return default_app.run()
  File "D:\Anaconda3\envs\myenv3604\lib\site-packages\vispy\app\application.py",
 line 142, in run
    return self._backend._vispy_run()
  File "D:\Anaconda3\envs\myenv3604\lib\site-packages\vispy\app\backends\_qt.py"
, line 229, in _vispy_run
    return app.exec_()
  File "D:\Anaconda3\envs\myenv3604\lib\site-packages\vispy\app\backends\_qt.py"
, line 436, in event
    out = super(QtBaseCanvasBackend, self).event(ev)
  File "D:\Anaconda3\envs\myenv3604\lib\site-packages\vispy\app\backends\_qt.py"
, line 708, in paintGL
    self._vispy_canvas.events.draw(region=None)
  File "D:\Anaconda3\envs\myenv3604\lib\site-packages\vispy\util\event.py", line
 455, in __call__
    self._invoke_callback(cb, event)
  File "D:\Anaconda3\envs\myenv3604\lib\site-packages\vispy\util\event.py", line
 475, in _invoke_callback
    self, cb_event=(cb, event))
  << caught exception here: >>
  File "D:\Anaconda3\envs\myenv3604\lib\site-packages\vispy\util\event.py", line
 471, in _invoke_callback
    cb(event)
  File "displayline.py", line 123, in on_draw
    self.program.draw('line_strip')
  File "D:\Anaconda3\envs\myenv3604\lib\site-packages\vispy\gloo\program.py", li
ne 470, in draw
    canvas.context.flush_commands()
  File "D:\Anaconda3\envs\myenv3604\lib\site-packages\vispy\gloo\context.py", li
ne 170, in flush_commands
    self.shared.parser.parse([('CURRENT', 0)])
  File "D:\Anaconda3\envs\myenv3604\lib\site-packages\vispy\gloo\glir.py", line
477, in parse
    self._parse(command)
  File "D:\Anaconda3\envs\myenv3604\lib\site-packages\vispy\gloo\glir.py", line
404, in _parse
    self._gl_initialize()
  File "D:\Anaconda3\envs\myenv3604\lib\site-packages\vispy\gloo\glir.py", line
502, in _gl_initialize
    if this_version < '2.1':
  File "D:\Anaconda3\envs\myenv3604\lib\distutils\version.py", line 52, in __lt_
_
    c = self._cmp(other)
  File "D:\Anaconda3\envs\myenv3604\lib\distutils\version.py", line 335, in _cmp

    if self.version == other.version:
AttributeError: 'LooseVersion' object has no attribute 'version'
ERROR: Invoking <bound method Canvas.on_draw of <Canvas (PyQt5) at 0x12ca128>> f
or DrawEvent
WARNING: Traceback (most recent call last):
  File "displayline.py", line 128, in <module>
    app.run()
  File "D:\Anaconda3\envs\myenv3604\lib\site-packages\vispy\app\_default_app.py"
, line 62, in run
    return default_app.run()
  File "D:\Anaconda3\envs\myenv3604\lib\site-packages\vispy\app\application.py",
 line 142, in run
    return self._backend._vispy_run()
  File "D:\Anaconda3\envs\myenv3604\lib\site-packages\vispy\app\backends\_qt.py"
, line 229, in _vispy_run
    return app.exec_()
  File "D:\Anaconda3\envs\myenv3604\lib\site-packages\vispy\app\backends\_qt.py"
, line 436, in event
    out = super(QtBaseCanvasBackend, self).event(ev)
  File "D:\Anaconda3\envs\myenv3604\lib\site-packages\vispy\app\backends\_qt.py"
, line 708, in paintGL
    self._vispy_canvas.events.draw(region=None)
  File "D:\Anaconda3\envs\myenv3604\lib\site-packages\vispy\util\event.py", line
 455, in __call__
    self._invoke_callback(cb, event)
  File "D:\Anaconda3\envs\myenv3604\lib\site-packages\vispy\util\event.py", line
 475, in _invoke_callback
    self, cb_event=(cb, event))
  << caught exception here: >>
  File "D:\Anaconda3\envs\myenv3604\lib\site-packages\vispy\gloo\gl\_gl2.py", li
ne 116, in glBlendFuncSeparate
    nativefunc = glBlendFuncSeparate._native
AttributeError: 'function' object has no attribute '_native'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "D:\Anaconda3\envs\myenv3604\lib\site-packages\vispy\gloo\gl\gl2.py", lin
e 72, in _get_gl_func
    func = getattr(_lib, name)
  File "D:\Anaconda3\envs\myenv3604\lib\ctypes\__init__.py", line 364, in __geta
ttr__
    func = self.__getitem__(name)
  File "D:\Anaconda3\envs\myenv3604\lib\ctypes\__init__.py", line 369, in __geti
tem__
    func = self._FuncPtr((name_or_ordinal, self))
AttributeError: function 'glBlendFuncSeparate' not found

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "D:\Anaconda3\envs\myenv3604\lib\site-packages\vispy\util\event.py", line
 471, in _invoke_callback
    cb(event)
  File "D:\Anaconda3\envs\myenv3604\lib\site-packages\vispy\gloo\context.py", li
ne 171, in flush_commands
    self.glir.flush(self.shared.parser)
  File "D:\Anaconda3\envs\myenv3604\lib\site-packages\vispy\gloo\glir.py", line
232, in flush
    self._shared.flush(parser)
  File "D:\Anaconda3\envs\myenv3604\lib\site-packages\vispy\gloo\glir.py", line
146, in flush
    parser.parse(self._filter(self.clear(), parser))
  File "D:\Anaconda3\envs\myenv3604\lib\site-packages\vispy\gloo\glir.py", line
477, in parse
    self._parse(command)
  File "D:\Anaconda3\envs\myenv3604\lib\site-packages\vispy\gloo\glir.py", line
410, in _parse
    getattr(gl, id_)(*args)
  File "D:\Anaconda3\envs\myenv3604\lib\site-packages\vispy\gloo\gl\_gl2.py", li
ne 118, in glBlendFuncSeparate
    nativefunc = glBlendFuncSeparate._native = _get_gl_func("glBlendFuncSeparate
", None, (ctypes.c_uint, ctypes.c_uint, ctypes.c_uint, ctypes.c_uint,))
  File "D:\Anaconda3\envs\myenv3604\lib\site-packages\vispy\gloo\gl\gl2.py", lin
e 87, in _get_gl_func
    raise RuntimeError('Using %s with no OpenGL context.' % name)
RuntimeError: Using glBlendFuncSeparate with no OpenGL context.
ERROR: Invoking <bound method GLContext.flush_commands of <GLContext at 0x3880e1
0>> for DrawEvent
ERROR: Invoking <bound method Canvas.on_draw of <Canvas (PyQt5) at 0x12ca128>> r
epeat 2
ERROR: Invoking <bound method GLContext.flush_commands of <GLContext at 0x3880e1
0>> repeat 2
ERROR: Invoking <bound method Canvas.on_draw of <Canvas (PyQt5) at 0x12ca128>> r
epeat 4
ERROR: Invoking <bound method GLContext.flush_commands of <GLContext at 0x3880e1
0>> repeat 4

from visbrain.

STREETKILLER007 avatar STREETKILLER007 commented on May 18, 2024

Update

i created another environment, which is also Python 3.6.

after i typed conda install "pyqt<5"

what i did was below :

  1. before install Visbrain

before install

  1. after install Visbrain
    after visbrain

It Seem that Vispy is working fine.

===

After that, i tried to run following :

  1. testtopo.py

the code is

from visbrain import Topo

# Create a topoplot instance :
t = Topo()

if ignore the vispy error, it seems fine.

capture

  1. testtopofull.py

the code is

from visbrain import Topo

# Create a topoplot instance :
t = Topo()

# Create a list of channels, data, title and colorbar label :
name = 'Topo_1'
channels = ['C3', 'C4', 'Cz', 'Fz', 'Pz']
data = [10, 20, 30, 10, 10]
title = 'Basic topoplot illustration'
cblabel = 'Colorbar label'

# Add a central topoplot :
t.add_topoplot(name, data, channels=channels, title=title, cblabel=cblabel)

# Show the window :
t.show()

testtopofull

stack trace is below

(myenv36041) C:\Users\JamesTan\Desktop>python testtopofull.py
D:\Anaconda3\envs\myenv36041\lib\site-packages\vispy\visuals\isocurve.py:22: Use
rWarning: VisPy is not yet compatible with matplotlib 2.2+
  warnings.warn("VisPy is not yet compatible with matplotlib 2.2+")
WARNING: Error drawing visual <vispy.visuals.mesh.MeshVisual object at 0x0000000
017D12588>
WARNING: Traceback (most recent call last):
  File "testtopofull.py", line 17, in <module>
    t.show()
  File "D:\Anaconda3\envs\myenv36041\lib\site-packages\visbrain\pyqt_module.py",
 line 106, in show
    CONFIG['VISPY_APP'].run()
  File "D:\Anaconda3\envs\myenv36041\lib\site-packages\vispy\app\application.py"
, line 142, in run
    return self._backend._vispy_run()
  File "D:\Anaconda3\envs\myenv36041\lib\site-packages\vispy\app\backends\_qt.py
", line 229, in _vispy_run
    return app.exec_()
  File "D:\Anaconda3\envs\myenv36041\lib\site-packages\vispy\app\backends\_qt.py
", line 436, in event
    out = super(QtBaseCanvasBackend, self).event(ev)
  File "D:\Anaconda3\envs\myenv36041\lib\site-packages\vispy\app\backends\_qt.py
", line 708, in paintGL
    self._vispy_canvas.events.draw(region=None)
  File "D:\Anaconda3\envs\myenv36041\lib\site-packages\vispy\util\event.py", lin
e 455, in __call__
    self._invoke_callback(cb, event)
  File "D:\Anaconda3\envs\myenv36041\lib\site-packages\vispy\util\event.py", lin
e 475, in _invoke_callback
    self, cb_event=(cb, event))
  << caught exception here: >>
  File "D:\Anaconda3\envs\myenv36041\lib\site-packages\vispy\util\event.py", lin
e 471, in _invoke_callback
    cb(event)
  File "D:\Anaconda3\envs\myenv36041\lib\site-packages\vispy\scene\canvas.py", l
ine 207, in on_draw
    self._draw_scene()
  File "D:\Anaconda3\envs\myenv36041\lib\site-packages\vispy\scene\canvas.py", l
ine 253, in _draw_scene
    self.draw_visual(self.scene)
  File "D:\Anaconda3\envs\myenv36041\lib\site-packages\vispy\scene\canvas.py", l
ine 291, in draw_visual
    node.draw()
  File "D:\Anaconda3\envs\myenv36041\lib\site-packages\vispy\scene\visuals.py",
line 98, in draw
    self._visual_superclass.draw(self)
  File "D:\Anaconda3\envs\myenv36041\lib\site-packages\vispy\visuals\visual.py",
 line 588, in draw
    v.draw()
  File "D:\Anaconda3\envs\myenv36041\lib\site-packages\vispy\visuals\mesh.py", l
ine 517, in draw
    Visual.draw(self, *args, **kwds)
  File "D:\Anaconda3\envs\myenv36041\lib\site-packages\vispy\visuals\visual.py",
 line 440, in draw
    self._vshare.index_buffer)
  File "D:\Anaconda3\envs\myenv36041\lib\site-packages\vispy\visuals\shaders\pro
gram.py", line 77, in draw
    Program.draw(self, *args, **kwargs)
  File "D:\Anaconda3\envs\myenv36041\lib\site-packages\vispy\gloo\program.py", l
ine 470, in draw
    canvas.context.flush_commands()
  File "D:\Anaconda3\envs\myenv36041\lib\site-packages\vispy\gloo\context.py", l
ine 170, in flush_commands
    self.shared.parser.parse([('CURRENT', 0)])
  File "D:\Anaconda3\envs\myenv36041\lib\site-packages\vispy\gloo\glir.py", line
 477, in parse
    self._parse(command)
  File "D:\Anaconda3\envs\myenv36041\lib\site-packages\vispy\gloo\glir.py", line
 404, in _parse
    self._gl_initialize()
  File "D:\Anaconda3\envs\myenv36041\lib\site-packages\vispy\gloo\glir.py", line
 502, in _gl_initialize
    if this_version < '2.1':
  File "D:\Anaconda3\envs\myenv36041\lib\distutils\version.py", line 52, in __lt
__
    c = self._cmp(other)
  File "D:\Anaconda3\envs\myenv36041\lib\distutils\version.py", line 335, in _cm
p
    if self.version == other.version:
AttributeError: 'LooseVersion' object has no attribute 'version'
ERROR: Invoking <bound method SceneCanvas.on_draw of <SceneCanvas (PyQt5) at 0xe
523a20>> for DrawEvent
WARNING: Traceback (most recent call last):
  File "testtopofull.py", line 17, in <module>
    t.show()
  File "D:\Anaconda3\envs\myenv36041\lib\site-packages\visbrain\pyqt_module.py",
 line 106, in show
    CONFIG['VISPY_APP'].run()
  File "D:\Anaconda3\envs\myenv36041\lib\site-packages\vispy\app\application.py"
, line 142, in run
    return self._backend._vispy_run()
  File "D:\Anaconda3\envs\myenv36041\lib\site-packages\vispy\app\backends\_qt.py
", line 229, in _vispy_run
    return app.exec_()
  File "D:\Anaconda3\envs\myenv36041\lib\site-packages\vispy\app\backends\_qt.py
", line 436, in event
    out = super(QtBaseCanvasBackend, self).event(ev)
  File "D:\Anaconda3\envs\myenv36041\lib\site-packages\vispy\app\backends\_qt.py
", line 708, in paintGL
    self._vispy_canvas.events.draw(region=None)
  File "D:\Anaconda3\envs\myenv36041\lib\site-packages\vispy\util\event.py", lin
e 455, in __call__
    self._invoke_callback(cb, event)
  File "D:\Anaconda3\envs\myenv36041\lib\site-packages\vispy\util\event.py", lin
e 475, in _invoke_callback
    self, cb_event=(cb, event))
  << caught exception here: >>
  File "D:\Anaconda3\envs\myenv36041\lib\site-packages\vispy\gloo\gl\_gl2.py", l
ine 116, in glBlendFuncSeparate
    nativefunc = glBlendFuncSeparate._native
AttributeError: 'function' object has no attribute '_native'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "D:\Anaconda3\envs\myenv36041\lib\site-packages\vispy\gloo\gl\gl2.py", li
ne 72, in _get_gl_func
    func = getattr(_lib, name)
  File "D:\Anaconda3\envs\myenv36041\lib\ctypes\__init__.py", line 364, in __get
attr__
    func = self.__getitem__(name)
  File "D:\Anaconda3\envs\myenv36041\lib\ctypes\__init__.py", line 369, in __get
item__
    func = self._FuncPtr((name_or_ordinal, self))
AttributeError: function 'glBlendFuncSeparate' not found

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "D:\Anaconda3\envs\myenv36041\lib\site-packages\vispy\util\event.py", lin
e 471, in _invoke_callback
    cb(event)
  File "D:\Anaconda3\envs\myenv36041\lib\site-packages\vispy\gloo\context.py", l
ine 171, in flush_commands
    self.glir.flush(self.shared.parser)
  File "D:\Anaconda3\envs\myenv36041\lib\site-packages\vispy\gloo\glir.py", line
 232, in flush
    self._shared.flush(parser)
  File "D:\Anaconda3\envs\myenv36041\lib\site-packages\vispy\gloo\glir.py", line
 146, in flush
    parser.parse(self._filter(self.clear(), parser))
  File "D:\Anaconda3\envs\myenv36041\lib\site-packages\vispy\gloo\glir.py", line
 477, in parse
    self._parse(command)
  File "D:\Anaconda3\envs\myenv36041\lib\site-packages\vispy\gloo\glir.py", line
 410, in _parse
    getattr(gl, id_)(*args)
  File "D:\Anaconda3\envs\myenv36041\lib\site-packages\vispy\gloo\gl\_gl2.py", l
ine 118, in glBlendFuncSeparate
    nativefunc = glBlendFuncSeparate._native = _get_gl_func("glBlendFuncSeparate
", None, (ctypes.c_uint, ctypes.c_uint, ctypes.c_uint, ctypes.c_uint,))
  File "D:\Anaconda3\envs\myenv36041\lib\site-packages\vispy\gloo\gl\gl2.py", li
ne 87, in _get_gl_func
    raise RuntimeError('Using %s with no OpenGL context.' % name)
RuntimeError: Using glBlendFuncSeparate with no OpenGL context.
ERROR: Invoking <bound method GLContext.flush_commands of <GLContext at 0xe54427
8>> for DrawEvent
WARNING: Error drawing visual <vispy.visuals.mesh.MeshVisual object at 0x0000000
017D12588>
ERROR: Invoking <bound method SceneCanvas.on_draw of <SceneCanvas (PyQt5) at 0xe
523a20>> repeat 2
ERROR: Invoking <bound method GLContext.flush_commands of <GLContext at 0xe54427
8>> repeat 2

from visbrain.

STREETKILLER007 avatar STREETKILLER007 commented on May 18, 2024

according to @ djhoese, conda install "pyqt<5" is to check whether vispy is working properly or not.

I did not look at MNE-Python, because i would like to try out Visbrain.

i will try pip install pandas PyOpenGL

after install PyOpenGL in my environment, below is my pip list

(myenv36041) C:\Users\JamesTan\Desktop>pip list
Package         Version
--------------- ---------
certifi         2018.4.16
click           6.7
cycler          0.10.0
kiwisolver      1.0.1
matplotlib      2.2.3
numpy           1.15.0
pandas          0.23.4
Pillow          5.2.0
pip             18.0
PyOpenGL        3.1.0
pyparsing       2.2.0
PyQt5           5.11.2
PyQt5-sip       4.19.12
python-dateutil 2.7.3
pytz            2018.5
scipy           1.1.0
setuptools      40.0.0
six             1.11.0
visbrain        0.4.2
vispy           0.5.3
wheel           0.31.1
wincertstore    0.2

when i tried this commend

from visbrain.objects import BrainObj
BrainObj('B1').preview()

it pops out this error

testbrain

stack trace is as below :

(myenv36041) C:\Users\JamesTan\Desktop>python testbrain.py
D:\Anaconda3\envs\myenv36041\lib\site-packages\vispy\visuals\isocurve.py:22: Use
rWarning: VisPy is not yet compatible with matplotlib 2.2+
  warnings.warn("VisPy is not yet compatible with matplotlib 2.2+")
�[1m�[1;37mINFO�[0m | BrainObj(name='B1') created
WARNING: Error drawing visual <Brain name=Mesh at 0xd64e780>
WARNING: Traceback (most recent call last):
  File "testbrain.py", line 2, in <module>
    BrainObj('B1').preview()
  File "D:\Anaconda3\envs\myenv36041\lib\site-packages\visbrain\objects\visbrain
_obj.py", line 159, in preview
    CONFIG['VISPY_APP'].run()
  File "D:\Anaconda3\envs\myenv36041\lib\site-packages\vispy\app\application.py"
, line 142, in run
    return self._backend._vispy_run()
  File "D:\Anaconda3\envs\myenv36041\lib\site-packages\vispy\app\backends\_qt.py
", line 229, in _vispy_run
    return app.exec_()
  File "D:\Anaconda3\envs\myenv36041\lib\site-packages\vispy\app\backends\_qt.py
", line 436, in event
    out = super(QtBaseCanvasBackend, self).event(ev)
  File "D:\Anaconda3\envs\myenv36041\lib\site-packages\vispy\app\backends\_qt.py
", line 708, in paintGL
    self._vispy_canvas.events.draw(region=None)
  File "D:\Anaconda3\envs\myenv36041\lib\site-packages\vispy\util\event.py", lin
e 455, in __call__
    self._invoke_callback(cb, event)
  File "D:\Anaconda3\envs\myenv36041\lib\site-packages\vispy\util\event.py", lin
e 475, in _invoke_callback
    self, cb_event=(cb, event))
  << caught exception here: >>
  File "D:\Anaconda3\envs\myenv36041\lib\site-packages\vispy\util\event.py", lin
e 471, in _invoke_callback
    cb(event)
  File "D:\Anaconda3\envs\myenv36041\lib\site-packages\vispy\scene\canvas.py", l
ine 207, in on_draw
    self._draw_scene()
  File "D:\Anaconda3\envs\myenv36041\lib\site-packages\vispy\scene\canvas.py", l
ine 253, in _draw_scene
    self.draw_visual(self.scene)
  File "D:\Anaconda3\envs\myenv36041\lib\site-packages\vispy\scene\canvas.py", l
ine 291, in draw_visual
    node.draw()
  File "D:\Anaconda3\envs\myenv36041\lib\site-packages\vispy\scene\visuals.py",
line 98, in draw
    self._visual_superclass.draw(self)
  File "D:\Anaconda3\envs\myenv36041\lib\site-packages\visbrain\visuals\BrainVis
ual.py", line 403, in draw
    Visual.draw(self, *args, **kwds)
  File "D:\Anaconda3\envs\myenv36041\lib\site-packages\vispy\visuals\visual.py",
 line 440, in draw
    self._vshare.index_buffer)
  File "D:\Anaconda3\envs\myenv36041\lib\site-packages\vispy\visuals\shaders\pro
gram.py", line 77, in draw
    Program.draw(self, *args, **kwargs)
  File "D:\Anaconda3\envs\myenv36041\lib\site-packages\vispy\gloo\program.py", l
ine 470, in draw
    canvas.context.flush_commands()
  File "D:\Anaconda3\envs\myenv36041\lib\site-packages\vispy\gloo\context.py", l
ine 170, in flush_commands
    self.shared.parser.parse([('CURRENT', 0)])
  File "D:\Anaconda3\envs\myenv36041\lib\site-packages\vispy\gloo\glir.py", line
 477, in parse
    self._parse(command)
  File "D:\Anaconda3\envs\myenv36041\lib\site-packages\vispy\gloo\glir.py", line
 404, in _parse
    self._gl_initialize()
  File "D:\Anaconda3\envs\myenv36041\lib\site-packages\vispy\gloo\glir.py", line
 502, in _gl_initialize
    if this_version < '2.1':
  File "D:\Anaconda3\envs\myenv36041\lib\distutils\version.py", line 52, in __lt
__
    c = self._cmp(other)
  File "D:\Anaconda3\envs\myenv36041\lib\distutils\version.py", line 335, in _cm
p
    if self.version == other.version:
AttributeError: 'LooseVersion' object has no attribute 'version'
ERROR: Invoking <bound method SceneCanvas.on_draw of <SceneCanvas (PyQt5) at 0xd
64eb70>> for DrawEvent
WARNING: Traceback (most recent call last):
  File "testbrain.py", line 2, in <module>
    BrainObj('B1').preview()
  File "D:\Anaconda3\envs\myenv36041\lib\site-packages\visbrain\objects\visbrain
_obj.py", line 159, in preview
    CONFIG['VISPY_APP'].run()
  File "D:\Anaconda3\envs\myenv36041\lib\site-packages\vispy\app\application.py"
, line 142, in run
    return self._backend._vispy_run()
  File "D:\Anaconda3\envs\myenv36041\lib\site-packages\vispy\app\backends\_qt.py
", line 229, in _vispy_run
    return app.exec_()
  File "D:\Anaconda3\envs\myenv36041\lib\site-packages\vispy\app\backends\_qt.py
", line 436, in event
    out = super(QtBaseCanvasBackend, self).event(ev)
  File "D:\Anaconda3\envs\myenv36041\lib\site-packages\vispy\app\backends\_qt.py
", line 708, in paintGL
    self._vispy_canvas.events.draw(region=None)
  File "D:\Anaconda3\envs\myenv36041\lib\site-packages\vispy\util\event.py", lin
e 455, in __call__
    self._invoke_callback(cb, event)
  File "D:\Anaconda3\envs\myenv36041\lib\site-packages\vispy\util\event.py", lin
e 475, in _invoke_callback
    self, cb_event=(cb, event))
  << caught exception here: >>
  File "D:\Anaconda3\envs\myenv36041\lib\site-packages\vispy\gloo\gl\_gl2.py", l
ine 116, in glBlendFuncSeparate
    nativefunc = glBlendFuncSeparate._native
AttributeError: 'function' object has no attribute '_native'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "D:\Anaconda3\envs\myenv36041\lib\site-packages\vispy\gloo\gl\gl2.py", li
ne 72, in _get_gl_func
    func = getattr(_lib, name)
  File "D:\Anaconda3\envs\myenv36041\lib\ctypes\__init__.py", line 364, in __get
attr__
    func = self.__getitem__(name)
  File "D:\Anaconda3\envs\myenv36041\lib\ctypes\__init__.py", line 369, in __get
item__
    func = self._FuncPtr((name_or_ordinal, self))
AttributeError: function 'glBlendFuncSeparate' not found

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "D:\Anaconda3\envs\myenv36041\lib\site-packages\vispy\util\event.py", lin
e 471, in _invoke_callback
    cb(event)
  File "D:\Anaconda3\envs\myenv36041\lib\site-packages\vispy\gloo\context.py", l
ine 171, in flush_commands
    self.glir.flush(self.shared.parser)
  File "D:\Anaconda3\envs\myenv36041\lib\site-packages\vispy\gloo\glir.py", line
 232, in flush
    self._shared.flush(parser)
  File "D:\Anaconda3\envs\myenv36041\lib\site-packages\vispy\gloo\glir.py", line
 146, in flush
    parser.parse(self._filter(self.clear(), parser))
  File "D:\Anaconda3\envs\myenv36041\lib\site-packages\vispy\gloo\glir.py", line
 477, in parse
    self._parse(command)
  File "D:\Anaconda3\envs\myenv36041\lib\site-packages\vispy\gloo\glir.py", line
 410, in _parse
    getattr(gl, id_)(*args)
  File "D:\Anaconda3\envs\myenv36041\lib\site-packages\vispy\gloo\gl\_gl2.py", l
ine 118, in glBlendFuncSeparate
    nativefunc = glBlendFuncSeparate._native = _get_gl_func("glBlendFuncSeparate
", None, (ctypes.c_uint, ctypes.c_uint, ctypes.c_uint, ctypes.c_uint,))
  File "D:\Anaconda3\envs\myenv36041\lib\site-packages\vispy\gloo\gl\gl2.py", li
ne 87, in _get_gl_func
    raise RuntimeError('Using %s with no OpenGL context.' % name)
RuntimeError: Using glBlendFuncSeparate with no OpenGL context.
ERROR: Invoking <bound method GLContext.flush_commands of <GLContext at 0xe66086
0>> for DrawEvent
WARNING: Error drawing visual <Brain name=Mesh at 0xd64e780>
ERROR: Invoking <bound method SceneCanvas.on_draw of <SceneCanvas (PyQt5) at 0xd
64eb70>> repeat 2
ERROR: Invoking <bound method GLContext.flush_commands of <GLContext at 0xe66086
0>> repeat 2
WARNING: Error drawing visual <Brain name=Mesh at 0xd64e780>
WARNING: Error drawing visual <Brain name=Mesh at 0xd64e780>
ERROR: Invoking <bound method SceneCanvas.on_draw of <SceneCanvas (PyQt5) at 0xd
64eb70>> repeat 4
ERROR: Invoking <bound method GLContext.flush_commands of <GLContext at 0xe66086
0>> repeat 4
WARNING: Error drawing visual <Brain name=Mesh at 0xd64e780>
WARNING: Error drawing visual <Brain name=Mesh at 0xd64e780>
WARNING: Error drawing visual <Brain name=Mesh at 0xd64e780>
WARNING: Error drawing visual <Brain name=Mesh at 0xd64e780>
ERROR: Invoking <bound method SceneCanvas.on_draw of <SceneCanvas (PyQt5) at 0xd
64eb70>> repeat 8
ERROR: Invoking <bound method GLContext.flush_commands of <GLContext at 0xe66086
0>> repeat 8
WARNING: Error drawing visual <Brain name=Mesh at 0xd64e780>
WARNING: Error drawing visual <Brain name=Mesh at 0xd64e780>
WARNING: Error drawing visual <Brain name=Mesh at 0xd64e780>
WARNING: Error drawing visual <Brain name=Mesh at 0xd64e780>
WARNING: Error drawing visual <Brain name=Mesh at 0xd64e780>
WARNING: Error drawing visual <Brain name=Mesh at 0xd64e780>
WARNING: Error drawing visual <Brain name=Mesh at 0xd64e780>
WARNING: Error drawing visual <Brain name=Mesh at 0xd64e780>
ERROR: Invoking <bound method SceneCanvas.on_draw of <SceneCanvas (PyQt5) at 0xd
64eb70>> repeat 16
ERROR: Invoking <bound method GLContext.flush_commands of <GLContext at 0xe66086
0>> repeat 16
WARNING: Error drawing visual <Brain name=Mesh at 0xd64e780>
WARNING: Error drawing visual <Brain name=Mesh at 0xd64e780>
WARNING: Error drawing visual <Brain name=Mesh at 0xd64e780>
WARNING: Error drawing visual <Brain name=Mesh at 0xd64e780>
WARNING: Error drawing visual <Brain name=Mesh at 0xd64e780>
WARNING: Error drawing visual <Brain name=Mesh at 0xd64e780>
WARNING: Error drawing visual <Brain name=Mesh at 0xd64e780>
WARNING: Error drawing visual <Brain name=Mesh at 0xd64e780>
WARNING: Error drawing visual <Brain name=Mesh at 0xd64e780>
WARNING: Error drawing visual <Brain name=Mesh at 0xd64e780>
WARNING: Error drawing visual <Brain name=Mesh at 0xd64e780>
WARNING: Error drawing visual <Brain name=Mesh at 0xd64e780>
WARNING: Error drawing visual <Brain name=Mesh at 0xd64e780>
WARNING: Error drawing visual <Brain name=Mesh at 0xd64e780>
WARNING: Error drawing visual <Brain name=Mesh at 0xd64e780>
WARNING: Error drawing visual <Brain name=Mesh at 0xd64e780>
ERROR: Invoking <bound method SceneCanvas.on_draw of <SceneCanvas (PyQt5) at 0xd
64eb70>> repeat 32
ERROR: Invoking <bound method GLContext.flush_commands of <GLContext at 0xe66086
0>> repeat 32
WARNING: Error drawing visual <Brain name=Mesh at 0xd64e780>
WARNING: Error drawing visual <Brain name=Mesh at 0xd64e780>
WARNING: Error drawing visual <Brain name=Mesh at 0xd64e780>
WARNING: Error drawing visual <Brain name=Mesh at 0xd64e780>
WARNING: Error drawing visual <Brain name=Mesh at 0xd64e780>
WARNING: Error drawing visual <Brain name=Mesh at 0xd64e780>
WARNING: Error drawing visual <Brain name=Mesh at 0xd64e780>
WARNING: Error drawing visual <Brain name=Mesh at 0xd64e780>
WARNING: Error drawing visual <Brain name=Mesh at 0xd64e780>
WARNING: Error drawing visual <Brain name=Mesh at 0xd64e780>
WARNING: Error drawing visual <Brain name=Mesh at 0xd64e780>
WARNING: Error drawing visual <Brain name=Mesh at 0xd64e780>

i think i will try to do everything from scratch, hope good luck.

from visbrain.

STREETKILLER007 avatar STREETKILLER007 commented on May 18, 2024

followed your step which is

  • Create the 3.6 env : conda create -q -n py36 python=3.6 numpy scipy pip
  • Activate the environnement : source activate py36
  • Install dependencies : pip install matplotlib pyqt5 vispy pillow
  • Install visbrain : pip install visbrain

so this is my current pip list

(py36) C:\Users\JamesTan\Desktop>pip list
Package         Version
--------------- ---------
certifi         2018.4.16
click           6.7
cycler          0.10.0
kiwisolver      1.0.1
matplotlib      2.2.3
mkl-fft         1.0.4
mkl-random      1.0.1
numpy           1.15.0
Pillow          5.2.0
pip             18.0
pyparsing       2.2.0
PyQt5           5.11.2
PyQt5-sip       4.19.12
python-dateutil 2.7.3
pytz            2018.5
scipy           1.1.0
setuptools      40.0.0
six             1.11.0
visbrain        0.4.2
vispy           0.5.3
wheel           0.31.1
wincertstore    0.2

tried following code

from visbrain import Brain
Brain().show()

but pops out this error

testbrainbrain

stack trace :

(py36) C:\Users\JamesTan\Desktop>python testbrainbrain.py
D:\Anaconda3\envs\py36\lib\site-packages\vispy\visuals\isocurve.py:22: UserWarni
ng: VisPy is not yet compatible with matplotlib 2.2+
  warnings.warn("VisPy is not yet compatible with matplotlib 2.2+")
�[1m�[1;37mINFO�[0m | VolumeObj(name='brodmann') created
�[1m�[1;37mINFO�[0m | RoiObj(name='brodmann') created
Traceback (most recent call last):
  File "testbrainbrain.py", line 2, in <module>
    Brain().show()
  File "D:\Anaconda3\envs\py36\lib\site-packages\visbrain\brain\brain.py", line
106, in __init__
    Visuals.__init__(self, self.view.wc, **kwargs)
  File "D:\Anaconda3\envs\py36\lib\site-packages\visbrain\brain\visuals.py", lin
e 84, in __init__
    self.roi = RoiObj('brodmann')
  File "D:\Anaconda3\envs\py36\lib\site-packages\visbrain\objects\roi_obj.py", l
ine 103, in __init__
    self(name, vol, labels, index, hdr, system)
  File "D:\Anaconda3\envs\py36\lib\site-packages\visbrain\objects\roi_obj.py", l
ine 121, in __call__
    self._system)
  File "D:\Anaconda3\envs\py36\lib\site-packages\visbrain\objects\roi_obj.py", l
ine 189, in set_data
    is_pandas_installed(raise_error=True)
  File "D:\Anaconda3\envs\py36\lib\site-packages\visbrain\io\dependencies.py", l
ine 74, in is_pandas_installed
    raise IOError("pandas not installed. See https://pandas.pydata.org/#"
OSError: pandas not installed. See https://pandas.pydata.org/#best-way-to-instal
l for installation instructions.

tried pip install pandas

below is my pip list

(py36) C:\Users\JamesTan\Desktop>pip list
Package         Version
--------------- ---------
certifi         2018.4.16
click           6.7
cycler          0.10.0
kiwisolver      1.0.1
matplotlib      2.2.3
mkl-fft         1.0.4
mkl-random      1.0.1
numpy           1.15.0
pandas          0.23.4
Pillow          5.2.0
pip             18.0
pyparsing       2.2.0
PyQt5           5.11.2
PyQt5-sip       4.19.12
python-dateutil 2.7.3
pytz            2018.5
scipy           1.1.0
setuptools      40.0.0
six             1.11.0
visbrain        0.4.2
vispy           0.5.3
wheel           0.31.1
wincertstore    0.2

tried

from visbrain import Brain
Brain().show()

it showed this,
showbrain

error :

testbrainbrain error2

stack trace error :

(py36) C:\Users\JamesTan\Desktop>python testbrainbrain.py
D:\Anaconda3\envs\py36\lib\site-packages\vispy\visuals\isocurve.py:22: UserWarni
ng: VisPy is not yet compatible with matplotlib 2.2+
  warnings.warn("VisPy is not yet compatible with matplotlib 2.2+")
�[1m�[1;37mINFO�[0m | VolumeObj(name='brodmann') created
�[1m�[1;37mINFO�[0m | RoiObj(name='brodmann') created
�[1m�[1;37mINFO�[0m | brodmann ROI loaded.
�[1m�[1;37mINFO�[0m | CrossSecObj(name='brodmann') created
�[1m�[1;37mINFO�[0m | Cut coords at position [ -0.5 -17.5  18.5]
�[1m�[1;37mINFO�[0m | BrainObj(name='B1') created
WARNING: Error drawing visual <Brain name=Mesh at 0xf2bdcf8>
WARNING: Traceback (most recent call last):
  File "testbrainbrain.py", line 2, in <module>
    Brain().show()
  File "D:\Anaconda3\envs\py36\lib\site-packages\visbrain\pyqt_module.py", line
106, in show
    CONFIG['VISPY_APP'].run()
  File "D:\Anaconda3\envs\py36\lib\site-packages\vispy\app\application.py", line
 142, in run
    return self._backend._vispy_run()
  File "D:\Anaconda3\envs\py36\lib\site-packages\vispy\app\backends\_qt.py", lin
e 229, in _vispy_run
    return app.exec_()
  File "D:\Anaconda3\envs\py36\lib\site-packages\vispy\app\backends\_qt.py", lin
e 436, in event
    out = super(QtBaseCanvasBackend, self).event(ev)
  File "D:\Anaconda3\envs\py36\lib\site-packages\vispy\app\backends\_qt.py", lin
e 708, in paintGL
    self._vispy_canvas.events.draw(region=None)
  File "D:\Anaconda3\envs\py36\lib\site-packages\vispy\util\event.py", line 455,
 in __call__
    self._invoke_callback(cb, event)
  File "D:\Anaconda3\envs\py36\lib\site-packages\vispy\util\event.py", line 475,
 in _invoke_callback
    self, cb_event=(cb, event))
  << caught exception here: >>
  File "D:\Anaconda3\envs\py36\lib\site-packages\vispy\util\event.py", line 471,
 in _invoke_callback
    cb(event)
  File "D:\Anaconda3\envs\py36\lib\site-packages\vispy\scene\canvas.py", line 20
7, in on_draw
    self._draw_scene()
  File "D:\Anaconda3\envs\py36\lib\site-packages\vispy\scene\canvas.py", line 25
3, in _draw_scene
    self.draw_visual(self.scene)
  File "D:\Anaconda3\envs\py36\lib\site-packages\vispy\scene\canvas.py", line 29
1, in draw_visual
    node.draw()
  File "D:\Anaconda3\envs\py36\lib\site-packages\vispy\scene\visuals.py", line 9
8, in draw
    self._visual_superclass.draw(self)
  File "D:\Anaconda3\envs\py36\lib\site-packages\visbrain\visuals\BrainVisual.py
", line 403, in draw
    Visual.draw(self, *args, **kwds)
  File "D:\Anaconda3\envs\py36\lib\site-packages\vispy\visuals\visual.py", line
440, in draw
    self._vshare.index_buffer)
  File "D:\Anaconda3\envs\py36\lib\site-packages\vispy\visuals\shaders\program.p
y", line 77, in draw
    Program.draw(self, *args, **kwargs)
  File "D:\Anaconda3\envs\py36\lib\site-packages\vispy\gloo\program.py", line 47
0, in draw
    canvas.context.flush_commands()
  File "D:\Anaconda3\envs\py36\lib\site-packages\vispy\gloo\context.py", line 17
0, in flush_commands
    self.shared.parser.parse([('CURRENT', 0)])
  File "D:\Anaconda3\envs\py36\lib\site-packages\vispy\gloo\glir.py", line 477,
in parse
    self._parse(command)
  File "D:\Anaconda3\envs\py36\lib\site-packages\vispy\gloo\glir.py", line 404,
in _parse
    self._gl_initialize()
  File "D:\Anaconda3\envs\py36\lib\site-packages\vispy\gloo\glir.py", line 502,
in _gl_initialize
    if this_version < '2.1':
  File "D:\Anaconda3\envs\py36\lib\distutils\version.py", line 52, in __lt__
    c = self._cmp(other)
  File "D:\Anaconda3\envs\py36\lib\distutils\version.py", line 335, in _cmp
    if self.version == other.version:
AttributeError: 'LooseVersion' object has no attribute 'version'
ERROR: Invoking <bound method SceneCanvas.on_draw of <SceneCanvas (PyQt5) at 0xa
46be80>> for DrawEvent
WARNING: Traceback (most recent call last):
  File "testbrainbrain.py", line 2, in <module>
    Brain().show()
  File "D:\Anaconda3\envs\py36\lib\site-packages\visbrain\pyqt_module.py", line
106, in show
    CONFIG['VISPY_APP'].run()
  File "D:\Anaconda3\envs\py36\lib\site-packages\vispy\app\application.py", line
 142, in run
    return self._backend._vispy_run()
  File "D:\Anaconda3\envs\py36\lib\site-packages\vispy\app\backends\_qt.py", lin
e 229, in _vispy_run
    return app.exec_()
  File "D:\Anaconda3\envs\py36\lib\site-packages\vispy\app\backends\_qt.py", lin
e 436, in event
    out = super(QtBaseCanvasBackend, self).event(ev)
  File "D:\Anaconda3\envs\py36\lib\site-packages\vispy\app\backends\_qt.py", lin
e 708, in paintGL
    self._vispy_canvas.events.draw(region=None)
  File "D:\Anaconda3\envs\py36\lib\site-packages\vispy\util\event.py", line 455,
 in __call__
    self._invoke_callback(cb, event)
  File "D:\Anaconda3\envs\py36\lib\site-packages\vispy\util\event.py", line 475,
 in _invoke_callback
    self, cb_event=(cb, event))
  << caught exception here: >>
  File "D:\Anaconda3\envs\py36\lib\site-packages\vispy\gloo\gl\_gl2.py", line 11
6, in glBlendFuncSeparate
    nativefunc = glBlendFuncSeparate._native
AttributeError: 'function' object has no attribute '_native'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "D:\Anaconda3\envs\py36\lib\site-packages\vispy\gloo\gl\gl2.py", line 72,
 in _get_gl_func
    func = getattr(_lib, name)
  File "D:\Anaconda3\envs\py36\lib\ctypes\__init__.py", line 361, in __getattr__

    func = self.__getitem__(name)
  File "D:\Anaconda3\envs\py36\lib\ctypes\__init__.py", line 366, in __getitem__

    func = self._FuncPtr((name_or_ordinal, self))
AttributeError: function 'glBlendFuncSeparate' not found

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "D:\Anaconda3\envs\py36\lib\site-packages\vispy\util\event.py", line 471,
 in _invoke_callback
    cb(event)
  File "D:\Anaconda3\envs\py36\lib\site-packages\vispy\gloo\context.py", line 17
1, in flush_commands
    self.glir.flush(self.shared.parser)
  File "D:\Anaconda3\envs\py36\lib\site-packages\vispy\gloo\glir.py", line 232,
in flush
    self._shared.flush(parser)
  File "D:\Anaconda3\envs\py36\lib\site-packages\vispy\gloo\glir.py", line 146,
in flush
    parser.parse(self._filter(self.clear(), parser))
  File "D:\Anaconda3\envs\py36\lib\site-packages\vispy\gloo\glir.py", line 477,
in parse
    self._parse(command)
  File "D:\Anaconda3\envs\py36\lib\site-packages\vispy\gloo\glir.py", line 410,
in _parse
    getattr(gl, id_)(*args)
  File "D:\Anaconda3\envs\py36\lib\site-packages\vispy\gloo\gl\_gl2.py", line 11
8, in glBlendFuncSeparate
    nativefunc = glBlendFuncSeparate._native = _get_gl_func("glBlendFuncSeparate
", None, (ctypes.c_uint, ctypes.c_uint, ctypes.c_uint, ctypes.c_uint,))
  File "D:\Anaconda3\envs\py36\lib\site-packages\vispy\gloo\gl\gl2.py", line 87,
 in _get_gl_func
    raise RuntimeError('Using %s with no OpenGL context.' % name)
RuntimeError: Using glBlendFuncSeparate with no OpenGL context.
ERROR: Invoking <bound method GLContext.flush_commands of <GLContext at 0xa48a97
8>> for DrawEvent
WARNING: Error drawing visual <Brain name=Mesh at 0xf2bdcf8>
ERROR: Invoking <bound method SceneCanvas.on_draw of <SceneCanvas (PyQt5) at 0xa
46be80>> repeat 2
ERROR: Invoking <bound method GLContext.flush_commands of <GLContext at 0xa48a97
8>> repeat 2
WARNING: Error drawing visual <Brain name=Mesh at 0xf2bdcf8>
WARNING: Error drawing visual <Brain name=Mesh at 0xf2bdcf8>
ERROR: Invoking <bound method SceneCanvas.on_draw of <SceneCanvas (PyQt5) at 0xa
46be80>> repeat 4
ERROR: Invoking <bound method GLContext.flush_commands of <GLContext at 0xa48a97
8>> repeat 4
WARNING: Error drawing visual <Brain name=Mesh at 0xf2bdcf8>
WARNING: Error drawing visual <Brain name=Mesh at 0xf2bdcf8>
WARNING: Error drawing visual <Brain name=Mesh at 0xf2bdcf8>
WARNING: Error drawing visual <Brain name=Mesh at 0xf2bdcf8>
ERROR: Invoking <bound method SceneCanvas.on_draw of <SceneCanvas (PyQt5) at 0xa
46be80>> repeat 8
ERROR: Invoking <bound method GLContext.flush_commands of <GLContext at 0xa48a97
8>> repeat 8

from visbrain.

EtienneCmb avatar EtienneCmb commented on May 18, 2024

Ok, if the GUI is displayed this mean that both vispy and PyQt5 are properly installed.

May be dhoese (vispy) was right, you might have a driver issue... Can you try to install PyOpenGL as mentioned earlier?

from visbrain.

STREETKILLER007 avatar STREETKILLER007 commented on May 18, 2024

after pip install PyOpenGL
below is my pip list

(py36) C:\Users\JamesTan\Desktop>pip list
Package         Version
--------------- ---------
certifi         2018.4.16
click           6.7
cycler          0.10.0
kiwisolver      1.0.1
matplotlib      2.2.3
mkl-fft         1.0.4
mkl-random      1.0.1
numpy           1.15.0
pandas          0.23.4
Pillow          5.2.0
pip             18.0
PyOpenGL        3.1.0
pyparsing       2.2.0
PyQt5           5.11.2
PyQt5-sip       4.19.12
python-dateutil 2.7.3
pytz            2018.5
scipy           1.1.0
setuptools      40.0.0
six             1.11.0
visbrain        0.4.2
vispy           0.5.3
wheel           0.31.1
wincertstore    0.2

tried

from visbrain import Brain
Brain().show()

error occured

testbrainbrain error3

stack trace :

(py36) C:\Users\JamesTan\Desktop>python testbrainbrain.py
D:\Anaconda3\envs\py36\lib\site-packages\vispy\visuals\isocurve.py:22: UserWarni
ng: VisPy is not yet compatible with matplotlib 2.2+
  warnings.warn("VisPy is not yet compatible with matplotlib 2.2+")
�[1m�[1;37mINFO�[0m | VolumeObj(name='brodmann') created
�[1m�[1;37mINFO�[0m | RoiObj(name='brodmann') created
�[1m�[1;37mINFO�[0m | brodmann ROI loaded.
�[1m�[1;37mINFO�[0m | CrossSecObj(name='brodmann') created
�[1m�[1;37mINFO�[0m | Cut coords at position [ -0.5 -17.5  18.5]
�[1m�[1;37mINFO�[0m | BrainObj(name='B1') created
WARNING: Error drawing visual <Brain name=Mesh at 0xf19d9e8>
WARNING: Traceback (most recent call last):
  File "testbrainbrain.py", line 2, in <module>
    Brain().show()
  File "D:\Anaconda3\envs\py36\lib\site-packages\visbrain\pyqt_module.py", line
106, in show
    CONFIG['VISPY_APP'].run()
  File "D:\Anaconda3\envs\py36\lib\site-packages\vispy\app\application.py", line
 142, in run
    return self._backend._vispy_run()
  File "D:\Anaconda3\envs\py36\lib\site-packages\vispy\app\backends\_qt.py", lin
e 229, in _vispy_run
    return app.exec_()
  File "D:\Anaconda3\envs\py36\lib\site-packages\vispy\app\backends\_qt.py", lin
e 436, in event
    out = super(QtBaseCanvasBackend, self).event(ev)
  File "D:\Anaconda3\envs\py36\lib\site-packages\vispy\app\backends\_qt.py", lin
e 436, in event
    out = super(QtBaseCanvasBackend, self).event(ev)
  File "D:\Anaconda3\envs\py36\lib\site-packages\vispy\app\backends\_qt.py", lin
e 708, in paintGL
    self._vispy_canvas.events.draw(region=None)
  File "D:\Anaconda3\envs\py36\lib\site-packages\vispy\util\event.py", line 455,
 in __call__
    self._invoke_callback(cb, event)
  File "D:\Anaconda3\envs\py36\lib\site-packages\vispy\util\event.py", line 475,
 in _invoke_callback
    self, cb_event=(cb, event))
  << caught exception here: >>
  File "D:\Anaconda3\envs\py36\lib\site-packages\vispy\util\event.py", line 471,
 in _invoke_callback
    cb(event)
  File "D:\Anaconda3\envs\py36\lib\site-packages\vispy\scene\canvas.py", line 20
7, in on_draw
    self._draw_scene()
  File "D:\Anaconda3\envs\py36\lib\site-packages\vispy\scene\canvas.py", line 25
3, in _draw_scene
    self.draw_visual(self.scene)
  File "D:\Anaconda3\envs\py36\lib\site-packages\vispy\scene\canvas.py", line 29
1, in draw_visual
    node.draw()
  File "D:\Anaconda3\envs\py36\lib\site-packages\vispy\scene\visuals.py", line 9
8, in draw
    self._visual_superclass.draw(self)
  File "D:\Anaconda3\envs\py36\lib\site-packages\visbrain\visuals\BrainVisual.py
", line 403, in draw
    Visual.draw(self, *args, **kwds)
  File "D:\Anaconda3\envs\py36\lib\site-packages\vispy\visuals\visual.py", line
440, in draw
    self._vshare.index_buffer)
  File "D:\Anaconda3\envs\py36\lib\site-packages\vispy\visuals\shaders\program.p
y", line 77, in draw
    Program.draw(self, *args, **kwargs)
  File "D:\Anaconda3\envs\py36\lib\site-packages\vispy\gloo\program.py", line 47
0, in draw
    canvas.context.flush_commands()
  File "D:\Anaconda3\envs\py36\lib\site-packages\vispy\gloo\context.py", line 17
0, in flush_commands
    self.shared.parser.parse([('CURRENT', 0)])
  File "D:\Anaconda3\envs\py36\lib\site-packages\vispy\gloo\glir.py", line 477,
in parse
    self._parse(command)
  File "D:\Anaconda3\envs\py36\lib\site-packages\vispy\gloo\glir.py", line 404,
in _parse
    self._gl_initialize()
  File "D:\Anaconda3\envs\py36\lib\site-packages\vispy\gloo\glir.py", line 502,
in _gl_initialize
    if this_version < '2.1':
  File "D:\Anaconda3\envs\py36\lib\distutils\version.py", line 52, in __lt__
    c = self._cmp(other)
  File "D:\Anaconda3\envs\py36\lib\distutils\version.py", line 335, in _cmp
    if self.version == other.version:
AttributeError: 'LooseVersion' object has no attribute 'version'
ERROR: Invoking <bound method SceneCanvas.on_draw of <SceneCanvas (PyQt5) at 0xa
34beb8>> for DrawEvent
WARNING: Traceback (most recent call last):
  File "testbrainbrain.py", line 2, in <module>
    Brain().show()
  File "D:\Anaconda3\envs\py36\lib\site-packages\visbrain\pyqt_module.py", line
106, in show
    CONFIG['VISPY_APP'].run()
  File "D:\Anaconda3\envs\py36\lib\site-packages\vispy\app\application.py", line
 142, in run
    return self._backend._vispy_run()
  File "D:\Anaconda3\envs\py36\lib\site-packages\vispy\app\backends\_qt.py", lin
e 229, in _vispy_run
    return app.exec_()
  File "D:\Anaconda3\envs\py36\lib\site-packages\vispy\app\backends\_qt.py", lin
e 436, in event
    out = super(QtBaseCanvasBackend, self).event(ev)
  File "D:\Anaconda3\envs\py36\lib\site-packages\vispy\app\backends\_qt.py", lin
e 436, in event
    out = super(QtBaseCanvasBackend, self).event(ev)
  File "D:\Anaconda3\envs\py36\lib\site-packages\vispy\app\backends\_qt.py", lin
e 708, in paintGL
    self._vispy_canvas.events.draw(region=None)
  File "D:\Anaconda3\envs\py36\lib\site-packages\vispy\util\event.py", line 455,
 in __call__
    self._invoke_callback(cb, event)
  File "D:\Anaconda3\envs\py36\lib\site-packages\vispy\util\event.py", line 475,
 in _invoke_callback
    self, cb_event=(cb, event))
  << caught exception here: >>
  File "D:\Anaconda3\envs\py36\lib\site-packages\vispy\gloo\gl\_gl2.py", line 11
6, in glBlendFuncSeparate
    nativefunc = glBlendFuncSeparate._native
AttributeError: 'function' object has no attribute '_native'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "D:\Anaconda3\envs\py36\lib\site-packages\vispy\gloo\gl\gl2.py", line 72,
 in _get_gl_func
    func = getattr(_lib, name)
  File "D:\Anaconda3\envs\py36\lib\ctypes\__init__.py", line 361, in __getattr__

    func = self.__getitem__(name)
  File "D:\Anaconda3\envs\py36\lib\ctypes\__init__.py", line 366, in __getitem__

    func = self._FuncPtr((name_or_ordinal, self))
AttributeError: function 'glBlendFuncSeparate' not found

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "D:\Anaconda3\envs\py36\lib\site-packages\vispy\util\event.py", line 471,
 in _invoke_callback
    cb(event)
  File "D:\Anaconda3\envs\py36\lib\site-packages\vispy\gloo\context.py", line 17
1, in flush_commands
    self.glir.flush(self.shared.parser)
  File "D:\Anaconda3\envs\py36\lib\site-packages\vispy\gloo\glir.py", line 232,
in flush
    self._shared.flush(parser)
  File "D:\Anaconda3\envs\py36\lib\site-packages\vispy\gloo\glir.py", line 146,
in flush
    parser.parse(self._filter(self.clear(), parser))
  File "D:\Anaconda3\envs\py36\lib\site-packages\vispy\gloo\glir.py", line 477,
in parse
    self._parse(command)
  File "D:\Anaconda3\envs\py36\lib\site-packages\vispy\gloo\glir.py", line 410,
in _parse
    getattr(gl, id_)(*args)
  File "D:\Anaconda3\envs\py36\lib\site-packages\vispy\gloo\gl\_gl2.py", line 11
8, in glBlendFuncSeparate
    nativefunc = glBlendFuncSeparate._native = _get_gl_func("glBlendFuncSeparate
", None, (ctypes.c_uint, ctypes.c_uint, ctypes.c_uint, ctypes.c_uint,))
  File "D:\Anaconda3\envs\py36\lib\site-packages\vispy\gloo\gl\gl2.py", line 87,
 in _get_gl_func
    raise RuntimeError('Using %s with no OpenGL context.' % name)
RuntimeError: Using glBlendFuncSeparate with no OpenGL context.
ERROR: Invoking <bound method GLContext.flush_commands of <GLContext at 0xa36a9b
0>> for DrawEvent
WARNING: Error drawing visual <Brain name=Mesh at 0xf19d9e8>
ERROR: Invoking <bound method SceneCanvas.on_draw of <SceneCanvas (PyQt5) at 0xa
34beb8>> repeat 2
ERROR: Invoking <bound method GLContext.flush_commands of <GLContext at 0xa36a9b
0>> repeat 2
WARNING: Error drawing visual <Brain name=Mesh at 0xf19d9e8>
WARNING: Error drawing visual <Brain name=Mesh at 0xf19d9e8>
ERROR: Invoking <bound method SceneCanvas.on_draw of <SceneCanvas (PyQt5) at 0xa
34beb8>> repeat 4
ERROR: Invoking <bound method GLContext.flush_commands of <GLContext at 0xa36a9b
0>> repeat 4
WARNING: Error drawing visual <Brain name=Mesh at 0xf19d9e8>
WARNING: Error drawing visual <Brain name=Mesh at 0xf19d9e8>
WARNING: Error drawing visual <Brain name=Mesh at 0xf19d9e8>
WARNING: Error drawing visual <Brain name=Mesh at 0xf19d9e8>
ERROR: Invoking <bound method SceneCanvas.on_draw of <SceneCanvas (PyQt5) at 0xa
34beb8>> repeat 8
ERROR: Invoking <bound method GLContext.flush_commands of <GLContext at 0xa36a9b
0>> repeat 8
WARNING: Error drawing visual <Brain name=Mesh at 0xf19d9e8>
WARNING: Error drawing visual <Brain name=Mesh at 0xf19d9e8>
WARNING: Error drawing visual <Brain name=Mesh at 0xf19d9e8>
WARNING: Error drawing visual <Brain name=Mesh at 0xf19d9e8>
WARNING: Error drawing visual <Brain name=Mesh at 0xf19d9e8>
WARNING: Error drawing visual <Brain name=Mesh at 0xf19d9e8>
WARNING: Error drawing visual <Brain name=Mesh at 0xf19d9e8>
WARNING: Error drawing visual <Brain name=Mesh at 0xf19d9e8>
ERROR: Invoking <bound method SceneCanvas.on_draw of <SceneCanvas (PyQt5) at 0xa
34beb8>> repeat 16
ERROR: Invoking <bound method GLContext.flush_commands of <GLContext at 0xa36a9b
0>> repeat 16
WARNING: Error drawing visual <Brain name=Mesh at 0xf19d9e8>
WARNING: Error drawing visual <Brain name=Mesh at 0xf19d9e8>
WARNING: Error drawing visual <Brain name=Mesh at 0xf19d9e8>
WARNING: Error drawing visual <Brain name=Mesh at 0xf19d9e8>
WARNING: Error drawing visual <Brain name=Mesh at 0xf19d9e8>
WARNING: Error drawing visual <Brain name=Mesh at 0xf19d9e8>
WARNING: Error drawing visual <Brain name=Mesh at 0xf19d9e8>
WARNING: Error drawing visual <Brain name=Mesh at 0xf19d9e8>
WARNING: Error drawing visual <Brain name=Mesh at 0xf19d9e8>
WARNING: Error drawing visual <Brain name=Mesh at 0xf19d9e8>
WARNING: Error drawing visual <Brain name=Mesh at 0xf19d9e8>
WARNING: Error drawing visual <Brain name=Mesh at 0xf19d9e8>
WARNING: Error drawing visual <Brain name=Mesh at 0xf19d9e8>
WARNING: Error drawing visual <Brain name=Mesh at 0xf19d9e8>
WARNING: Error drawing visual <Brain name=Mesh at 0xf19d9e8>
WARNING: Error drawing visual <Brain name=Mesh at 0xf19d9e8>
ERROR: Invoking <bound method SceneCanvas.on_draw of <SceneCanvas (PyQt5) at 0xa
34beb8>> repeat 32
ERROR: Invoking <bound method GLContext.flush_commands of <GLContext at 0xa36a9b
0>> repeat 32
WARNING: Error drawing visual <Brain name=Mesh at 0xf19d9e8>
WARNING: Error drawing visual <Brain name=Mesh at 0xf19d9e8>
WARNING: Error drawing visual <Brain name=Mesh at 0xf19d9e8>
WARNING: Error drawing visual <Brain name=Mesh at 0xf19d9e8>
WARNING: Error drawing visual <Brain name=Mesh at 0xf19d9e8>
WARNING: Error drawing visual <Brain name=Mesh at 0xf19d9e8>
WARNING: Error drawing visual <Brain name=Mesh at 0xf19d9e8>
WARNING: Error drawing visual <Brain name=Mesh at 0xf19d9e8>
WARNING: Error drawing visual <Brain name=Mesh at 0xf19d9e8>
WARNING: Error drawing visual <Brain name=Mesh at 0xf19d9e8>
WARNING: Error drawing visual <Brain name=Mesh at 0xf19d9e8>
WARNING: Error drawing visual <Brain name=Mesh at 0xf19d9e8>
WARNING: Error drawing visual <Brain name=Mesh at 0xf19d9e8>
WARNING: Error drawing visual <Brain name=Mesh at 0xf19d9e8>
WARNING: Error drawing visual <Brain name=Mesh at 0xf19d9e8>
WARNING: Error drawing visual <Brain name=Mesh at 0xf19d9e8>
WARNING: Error drawing visual <Brain name=Mesh at 0xf19d9e8>
WARNING: Error drawing visual <Brain name=Mesh at 0xf19d9e8>
WARNING: Error drawing visual <Brain name=Mesh at 0xf19d9e8>
WARNING: Error drawing visual <Brain name=Mesh at 0xf19d9e8>
WARNING: Error drawing visual <Brain name=Mesh at 0xf19d9e8>
WARNING: Error drawing visual <Brain name=Mesh at 0xf19d9e8>
WARNING: Error drawing visual <Brain name=Mesh at 0xf19d9e8>
WARNING: Error drawing visual <Brain name=Mesh at 0xf19d9e8>
WARNING: Error drawing visual <Brain name=Mesh at 0xf19d9e8>
WARNING: Error drawing visual <Brain name=Mesh at 0xf19d9e8>
WARNING: Error drawing visual <Brain name=Mesh at 0xf19d9e8>
WARNING: Error drawing visual <Brain name=Mesh at 0xf19d9e8>
WARNING: Error drawing visual <Brain name=Mesh at 0xf19d9e8>
WARNING: Error drawing visual <Brain name=Mesh at 0xf19d9e8>
WARNING: Error drawing visual <Brain name=Mesh at 0xf19d9e8>
WARNING: Error drawing visual <Brain name=Mesh at 0xf19d9e8>
ERROR: Invoking <bound method SceneCanvas.on_draw of <SceneCanvas (PyQt5) at 0xa
34beb8>> repeat 64
ERROR: Invoking <bound method GLContext.flush_commands of <GLContext at 0xa36a9b
0>> repeat 64
WARNING: Error drawing visual <Brain name=Mesh at 0xf19d9e8>
WARNING: Error drawing visual <Brain name=Mesh at 0xf19d9e8>
WARNING: Error drawing visual <Brain name=Mesh at 0xf19d9e8>
WARNING: Error drawing visual <Brain name=Mesh at 0xf19d9e8>
WARNING: Error drawing visual <Brain name=Mesh at 0xf19d9e8>
WARNING: Error drawing visual <Brain name=Mesh at 0xf19d9e8>
WARNING: Error drawing visual <Brain name=Mesh at 0xf19d9e8>
WARNING: Error drawing visual <Brain name=Mesh at 0xf19d9e8>
WARNING: Error drawing visual <Brain name=Mesh at 0xf19d9e8>
WARNING: Error drawing visual <Brain name=Mesh at 0xf19d9e8>
WARNING: Error drawing visual <Brain name=Mesh at 0xf19d9e8>
WARNING: Error drawing visual <Brain name=Mesh at 0xf19d9e8>
WARNING: Error drawing visual <Brain name=Mesh at 0xf19d9e8>
WARNING: Error drawing visual <Brain name=Mesh at 0xf19d9e8>
WARNING: Error drawing visual <Brain name=Mesh at 0xf19d9e8>
WARNING: Error drawing visual <Brain name=Mesh at 0xf19d9e8>
WARNING: Error drawing visual <Brain name=Mesh at 0xf19d9e8>
WARNING: Error drawing visual <Brain name=Mesh at 0xf19d9e8>
WARNING: Error drawing visual <Brain name=Mesh at 0xf19d9e8>
WARNING: Error drawing visual <Brain name=Mesh at 0xf19d9e8>
WARNING: Error drawing visual <Brain name=Mesh at 0xf19d9e8>
WARNING: Error drawing visual <Brain name=Mesh at 0xf19d9e8>
WARNING: Error drawing visual <Brain name=Mesh at 0xf19d9e8>
WARNING: Error drawing visual <Brain name=Mesh at 0xf19d9e8>
WARNING: Error drawing visual <Brain name=Mesh at 0xf19d9e8>
WARNING: Error drawing visual <Brain name=Mesh at 0xf19d9e8>
WARNING: Error drawing visual <Brain name=Mesh at 0xf19d9e8>
WARNING: Error drawing visual <Brain name=Mesh at 0xf19d9e8>

from visbrain.

EtienneCmb avatar EtienneCmb commented on May 18, 2024

Ok... Well, hence it might be a driver issue...

from visbrain.

STREETKILLER007 avatar STREETKILLER007 commented on May 18, 2024

I tried to update all my driver.
my graphic card is already up to date...

from visbrain.

EtienneCmb avatar EtienneCmb commented on May 18, 2024

BTW, for topoplots the ScoT toolbox is also able to do it. Just in case

from visbrain.

STREETKILLER007 avatar STREETKILLER007 commented on May 18, 2024

Will look at ScoT toolbox, thank you.

from visbrain.

STREETKILLER007 avatar STREETKILLER007 commented on May 18, 2024

Tried in a PC in cyber cafe.

below is my pip list

(py36) C:\Users\Administrator\Desktop>pip list
Package         Version
--------------- ---------
certifi         2018.4.16
click           6.7
cycler          0.10.0
kiwisolver      1.0.1
matplotlib      2.2.3
mkl-fft         1.0.4
mkl-random      1.0.1
numpy           1.15.0
pandas          0.23.4
Pillow          5.2.0
pip             18.0
PyOpenGL        3.1.0
pyparsing       2.2.0
PyQt5           5.11.2
PyQt5-sip       4.19.12
python-dateutil 2.7.3
pytz            2018.5
scipy           1.1.0
setuptools      40.0.0
six             1.11.0
visbrain        0.4.2
vispy           0.5.3
wheel           0.31.1
wincertstore    0.2

this is what i see.

capture

and i see a brain

capture1

stack trace :

(py36) C:\Users\Administrator\Desktop>python testbrainbrain.py
M:\Anaconda3\envs\py36\lib\site-packages\vispy\visuals\isocurve.py:22: UserWarni
ng: VisPy is not yet compatible with matplotlib 2.2+
  warnings.warn("VisPy is not yet compatible with matplotlib 2.2+")
�[1m�[1;37mINFO�[0m | VolumeObj(name='brodmann') created
�[1m�[1;37mINFO�[0m | RoiObj(name='brodmann') created
�[1m�[1;37mINFO�[0m | brodmann ROI loaded.
�[1m�[1;37mINFO�[0m | CrossSecObj(name='brodmann') created
�[1m�[1;37mINFO�[0m | Cut coords at position [ -0.5 -17.5  18.5]
�[1m�[1;37mINFO�[0m | BrainObj(name='B1') created

from visbrain.

EtienneCmb avatar EtienneCmb commented on May 18, 2024

Nice, it works :)

Can I close the issue?

from visbrain.

STREETKILLER007 avatar STREETKILLER007 commented on May 18, 2024

@EtienneCmb To run Visbrain, except graphic card and processor, would like to know that what else should i consider on running Visbrain in a computer ? Let said i am using Windows.

from visbrain.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.