Re: Crash with python 3.5 on ubuntu 16.04

Joel Palmius <[email protected]> Wed, 22 Feb 2017 10:37:21 +0000
Newsgroups gmane.comp.python.opengl.user
Message-ID <AM4PR0802MB2132705DBDE37F061F5C2228DB500@AM4PR0802MB2132.eurprd08.prod.outlook.com>
As a follow-up: I got an answer sent to me privately rather than to the lis=
t, and it solved the problem for my part. Posting the solution here for peo=
ple who run into the same issue.=A0

In order to avoid the crash "AttributeError: module 'OpenGL.GL' has no attr=
ibute 'GL_READ_WRITE'", it is sufficient to import OpenGL.GLU before OpenGL=
.GL.

The following code crashes (on some machines,=A0under unknown circumstances=
, on ubuntu 16.04)=A0with the stack trace in the original post:

#!/usr/bin/python3
import OpenGL
from OpenGL.GL import *

The following code does not crash:

#!/usr/bin/python3
import OpenGL
import OpenGL.GLU
from OpenGL.GL import *

I don't understand the reason for this behavior, but the solution is derive=
d from a bug report posted at python's bug tracker:=A0https://bugs.python.o=
rg/issue26245
---------------------------------------------------------------------------=
---
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