Re: [PyOpenGL-Users] Crash with python 3.5 on ubuntu 16.04
Brought to you by:
mcfletch
From: Matti K. <mat...@gm...> - 2017-02-20 23:48:39
|
I wasn't able to reproduce your error (Ubuntu 16.10), how did you install 3.0.2? But before answering that! If its not a hard requirement to use 3.0.2 I would suggest installing and using 3.1.0 : # remove your current pyopengl, might through synaptic or with $ sudo apt-get remove python3-pyopengl $ sudo apt-get install python3-pip $ python3 -m pip install pyopengl ...using 3.1.0 I saw no errors with your test script. == The most-recent code changes the line that errored out to: def mapVBO( vbo, access=0x88BA ): # GL_READ_WRITE If you really don't want to install 3.1.0, you could try editing /usr/lib/python3/dist-packages/OpenGL/arrays/vbo.py line 430 and making the change above-- you may find more errors though. On 2/20/17 3:07 PM, Joel Palmius wrote: > (cross-posted from the -devel list) > > I have a very simple script: > > #!/usr/bin/python3 > import OpenGL > from OpenGL.GL import * > > Running this script with python 3.5.1 on an updated ubuntu 16.04 causes the following stack trace: > > Traceback (most recent call last): > File "test.py", line 3, in <module> > from OpenGL.GL import * > File "/usr/lib/python3/dist-packages/OpenGL/GL/__init__.py", line 3, in <module> > from OpenGL.GL.VERSION.GL_1_1 import * > File "/usr/lib/python3/dist-packages/OpenGL/GL/VERSION/GL_1_1.py", line 10, in <module> > from OpenGL import platform, constants, constant, arrays > File "/usr/lib/python3/dist-packages/OpenGL/arrays/__init__.py", line 22, in <module> > formathandler.FormatHandler.loadAll() > File "/usr/lib/python3/dist-packages/OpenGL/arrays/formathandler.py", line 28, in loadAll > cls.loadPlugin( entrypoint ) > File "/usr/lib/python3/dist-packages/OpenGL/arrays/formathandler.py", line 35, in loadPlugin > plugin_class = entrypoint.load() > File "/usr/lib/python3/dist-packages/OpenGL/plugins.py", line 14, in load > return importByName( self.import_path ) > File "/usr/lib/python3/dist-packages/OpenGL/plugins.py", line 28, in importByName > module = __import__( ".".join(moduleName), {}, {}, moduleName) > File "/usr/lib/python3/dist-packages/OpenGL/arrays/vbo.py", line 430, in <module> > def mapVBO( vbo, access=GL.GL_READ_WRITE ): > AttributeError: module 'OpenGL.GL' has no attribute 'GL_READ_WRITE' > > Running exactly the same script with python 2.7.12 does not cause any crash. > > The installed version of pyopengl is 3.0.2. > > Is this a bug with pyopengl, and is this mailing list then the appropriate place to report it? > > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, SlashDot.org! http://sdm.link/slashdot > _______________________________________________ > PyOpenGL Homepage > http://pyopengl.sourceforge.net > _______________________________________________ > PyOpenGL-Users mailing list > PyO...@li... > https://lists.sourceforge.net/lists/listinfo/pyopengl-users |