ZeitgeberH / patchview

python toolkits and GUI for multi-patch whole-cell data analysis and visualization
https://patchview.readthedocs.io/en/latest/
BSD 3-Clause "New" or "Revised" License
14 stars 4 forks source link

[JOSS review] Error when running in Windows Subsystem for Linux (WSL 2) #6

Closed janfreyberg closed 2 years ago

janfreyberg commented 2 years ago

Hi,

after installing patchview using pip on WSL, I received the following error when running the patchview command:

AttributeError: 'NoneType' object has no attribute 'eglGetCurrentContext' ```error Traceback (most recent call last): File "", line 1, in File "/home/jan/joss-reviews/patchview/install-env/lib/python3.10/site-packages/patchview/__init__.py", line 1, in from . import patchview File "/home/jan/joss-reviews/patchview/install-env/lib/python3.10/site-packages/patchview/patchview.py", line 7, in import pyqtgraph.opengl as gl File "/home/jan/joss-reviews/patchview/install-env/lib/python3.10/site-packages/pyqtgraph/opengl/__init__.py", line 1, in from . import shaders File "/home/jan/joss-reviews/patchview/install-env/lib/python3.10/site-packages/pyqtgraph/opengl/shaders.py", line 1, in from OpenGL.GL import * # noqa File "/home/jan/joss-reviews/patchview/install-env/lib/python3.10/site-packages/OpenGL/GL/__init__.py", line 4, in from OpenGL.GL.VERSION.GL_1_1 import * File "/home/jan/joss-reviews/patchview/install-env/lib/python3.10/site-packages/OpenGL/GL/VERSION/GL_1_1.py", line 14, in from OpenGL.raw.GL.VERSION.GL_1_1 import * File "/home/jan/joss-reviews/patchview/install-env/lib/python3.10/site-packages/OpenGL/raw/GL/VERSION/GL_1_1.py", line 7, in from OpenGL.raw.GL import _errors File "/home/jan/joss-reviews/patchview/install-env/lib/python3.10/site-packages/OpenGL/raw/GL/_errors.py", line 4, in _error_checker = _ErrorChecker( _p, _p.GL.glGetError ) File "/home/jan/joss-reviews/patchview/install-env/lib/python3.10/site-packages/OpenGL/error.py", line 183, in __init__ self._isValid = platform.CurrentContextIsValid File "/home/jan/joss-reviews/patchview/install-env/lib/python3.10/site-packages/OpenGL/platform/baseplatform.py", line 15, in __get__ value = self.fget( obj ) File "/home/jan/joss-reviews/patchview/install-env/lib/python3.10/site-packages/OpenGL/platform/baseplatform.py", line 356, in CurrentContextIsValid return self.GetCurrentContext File "/home/jan/joss-reviews/patchview/install-env/lib/python3.10/site-packages/OpenGL/platform/baseplatform.py", line 15, in __get__ value = self.fget( obj ) File "/home/jan/joss-reviews/patchview/install-env/lib/python3.10/site-packages/OpenGL/platform/egl.py", line 106, in GetCurrentContext return self.EGL.eglGetCurrentContext AttributeError: 'NoneType' object has no attribute 'eglGetCurrentContext' ```

I suspect this might be related to using WSL, and this being a GUI application. Unless this is a real dependency problem on Linux (unfortunately, I don't have a "real" Linux installation), I suggest adding a disclaimer to the documentation that patchview does not run on WSL.

ZeitgeberH commented 2 years ago

Hi Jan, I can confirm that patchview can be installed in WSL/WSL2 under windows 10, but the GUI would not launch. Wsl2 on Windows 11 may work, but I currently do not have access to Windows 11. I've run patchview successfully on Ubuntu 18.04 LTS and Mac Catalina. These have been documented (in Get started/Pip install/note 2) as you suggested above. Thank you! Zeta