Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Topo Error #18

Closed
STREETKILLER007 opened this issue Jul 31, 2018 · 69 comments
Closed

Topo Error #18

STREETKILLER007 opened this issue Jul 31, 2018 · 69 comments
Labels

Comments

@STREETKILLER007
Copy link

STREETKILLER007 commented Jul 31, 2018

hello, developers, i am new in python.

i am trying to run this code in python.

111

but the error that i got is

112

after i read through the comment, i tried to install visbrain in developer mode and tried to run pip install matplotlib == 2.1.0
but it pops out this error
113

i tried to update my setuptools using pip install --upgrade setuptools
but it did not solve my problem.

is there any suggestion to solve this error ?

thank you.

@EtienneCmb
Copy link
Owner

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 ).

@EtienneCmb
Copy link
Owner

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

@STREETKILLER007
Copy link
Author

STREETKILLER007 commented Jul 31, 2018

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

@EtienneCmb
Copy link
Owner

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

@STREETKILLER007
Copy link
Author

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

@STREETKILLER007
Copy link
Author

STREETKILLER007 commented Aug 1, 2018

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

@EtienneCmb
Copy link
Owner

Can you try to create a python 3.6 environnement?

@STREETKILLER007
Copy link
Author

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.

@STREETKILLER007
Copy link
Author

STREETKILLER007 commented Aug 2, 2018

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.

@STREETKILLER007
Copy link
Author

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.

@STREETKILLER007 STREETKILLER007 changed the title matplotlib error Topo Error Aug 2, 2018
@STREETKILLER007
Copy link
Author

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.

@EtienneCmb
Copy link
Owner

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

@STREETKILLER007
Copy link
Author

STREETKILLER007 commented Aug 2, 2018

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.

@STREETKILLER007
Copy link
Author

STREETKILLER007 commented Aug 2, 2018

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.

@STREETKILLER007
Copy link
Author

STREETKILLER007 commented Aug 3, 2018

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.

@STREETKILLER007
Copy link
Author

STREETKILLER007 commented Aug 3, 2018

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

@EtienneCmb
Copy link
Owner

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

@STREETKILLER007
Copy link
Author

STREETKILLER007 commented Aug 3, 2018

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

@EtienneCmb
Copy link
Owner

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

@STREETKILLER007
Copy link
Author

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

@EtienneCmb
Copy link
Owner

Ok you don't use conda?

@STREETKILLER007
Copy link
Author

STREETKILLER007 commented Aug 3, 2018

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.

@EtienneCmb
Copy link
Owner

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

@STREETKILLER007
Copy link
Author

STREETKILLER007 commented Aug 3, 2018

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

@STREETKILLER007
Copy link
Author

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.

@EtienneCmb
Copy link
Owner

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

@STREETKILLER007
Copy link
Author

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

@EtienneCmb
Copy link
Owner

Yes, but some people experienced issues with miktex

@STREETKILLER007
Copy link
Author

STREETKILLER007 commented Aug 3, 2018

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.

@STREETKILLER007
Copy link
Author

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+")

@EtienneCmb
Copy link
Owner

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

@EtienneCmb
Copy link
Owner

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

@STREETKILLER007
Copy link
Author

STREETKILLER007 commented Aug 11, 2018

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.

@EtienneCmb
Copy link
Owner

  • 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

@STREETKILLER007
Copy link
Author

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>

@EtienneCmb
Copy link
Owner

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

@STREETKILLER007
Copy link
Author

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

@EtienneCmb
Copy link
Owner

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

@STREETKILLER007
Copy link
Author

"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

@STREETKILLER007
Copy link
Author

STREETKILLER007 commented Aug 12, 2018

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

@EtienneCmb
Copy link
Owner

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()

@STREETKILLER007
Copy link
Author

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.

@STREETKILLER007
Copy link
Author

STREETKILLER007 commented Aug 12, 2018

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

@EtienneCmb
Copy link
Owner

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?

@STREETKILLER007
Copy link
Author

STREETKILLER007 commented Aug 12, 2018

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>

@EtienneCmb
Copy link
Owner

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

@STREETKILLER007
Copy link
Author

STREETKILLER007 commented Aug 12, 2018

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

@EtienneCmb
Copy link
Owner

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

@STREETKILLER007
Copy link
Author

Will look at ScoT toolbox, thank you.

@STREETKILLER007
Copy link
Author

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

@EtienneCmb
Copy link
Owner

Nice, it works :)

Can I close the issue?

@STREETKILLER007
Copy link
Author

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

@STREETKILLER007
Copy link
Author

@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.

@EtienneCmb
Copy link
Owner

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

@STREETKILLER007
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants