Thanks, that means that they changed how the module behaves in 3.0.2 from
3.0.1. We'll have to figure out how to work around that. It was mainly a
performance gain, using "raw", so in the worst case we can backtrack out
of that, but hopefully 3.0.2 has some alternative.
Wayne
On Sat, 5 May 2012, Matthias Huber wrote:
> Hi Wayne,
> I checked my version of OpenGL
> mahu@mahu-desktop:~$ python
> Python 2.7.3 (default, Apr 20 2012, 22:39:59)
> [GCC 4.6.3] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import OpenGL
> >>> OpenGL.__version__
> '3.0.2a5'
> >>> OpenGL.__file__
> '/usr/local/lib/python2.7/dist-packages/PyOpenGL-3.0.2a5-py2.7.egg/OpenGL/__init__.pyc'
>
> I guess you meant the file
> /usr/local/lib/python2.7/dist-packages/PyOpenGL-3.0.2a5-py2.7.egg/OpenGL/raw/__init__.py
>
> It only contained
> """C-style "raw" API for low-level ctypes-specific access to OpenGL
>
> This sub-package is autogenerated using a customised version
> of the ctypes codegenerator package (see src/openglgenerator.py and
> src/generateraw.py).
> """
>
> I therefore added the lines you proposed to that file and tried starting specView again.
> I now get the following error message:
>
> mahu@mahu-desktop:~/bin/ccpnmr/ccpnmr3.0/bin$ ./specView
> Traceback (most recent call last):
> File "/home/mahu/bin/ccpnmr/ccpnmr3.0/python/ccpnmr/specView/SpecView.py", line
> 4, in <module>
> from ccpnmr.specView.gui.DisplayPanel import DEFAULT_COLORS
> File
> "/home/mahu/bin/ccpnmr/ccpnmr3.0/python/ccpnmr/specView/gui/DisplayPanel.py",
> line 24, in <module>
> from ccpnmr.specView.gui.SpecPanel import SpectrumPanel
> File "/home/mahu/bin/ccpnmr/ccpnmr3.0/python/ccpnmr/specView/gui/SpecPanel.py",
> line 12, in <module>
> from memops.qtgui.GlGraphicsView import GlGraphicsView
> File "/home/mahu/bin/ccpnmr/ccpnmr3.0/python/memops/qtgui/GlGraphicsView.py",
> line 2, in <module>
> from OpenGL import GL, GLU, GLUT
> File
> "/usr/local/lib/python2.7/dist-packages/PyOpenGL-3.0.2a5-py2.7.egg/OpenGL/GL/__init__.py",
> line 3, in <module>
> from OpenGL.GL.VERSION.GL_1_1 import *
> File
> "/usr/local/lib/python2.7/dist-packages/PyOpenGL-3.0.2a5-py2.7.egg/OpenGL/GL/VERSION/GL_1_1.py",
> line 12, in <module>
> from OpenGL.GL import glget
> File
> "/usr/local/lib/python2.7/dist-packages/PyOpenGL-3.0.2a5-py2.7.egg/OpenGL/GL/glget.py",
> line 13, in <module>
> from OpenGL.raw.GL.VERSION import GL_1_1 as simple
> File
> "/usr/local/lib/python2.7/dist-packages/PyOpenGL-3.0.2a5-py2.7.egg/OpenGL/raw/__init__.py",
> line 9, in <module>
> glColor4f = platform.createBaseFunction(
> NameError: name 'platform' is not defined
> Error in sys.excepthook:
> Traceback (most recent call last):
> File "/usr/lib/python2.7/dist-packages/apport_python_hook.py", line 64, in
> apport_excepthook
> from apport.fileutils import likely_packaged, get_recent_crashes
> File "/usr/lib/python2.7/dist-packages/apport/__init__.py", line 1, in <module>
> from apport.report import Report
> File "/usr/lib/python2.7/dist-packages/apport/report.py", line 18, in <module>
> import problem_report
> File "/usr/lib/python2.7/dist-packages/problem_report.py", line 14, in <module>
> import zlib, base64, time, sys, gzip, struct, os
> File "/usr/lib/python2.7/gzip.py", line 36, in <module>
> class GzipFile(io.BufferedIOBase):
> AttributeError: 'module' object has no attribute 'BufferedIOBase'
>
> Original exception was:
> Traceback (most recent call last):
> File "/home/mahu/bin/ccpnmr/ccpnmr3.0/python/ccpnmr/specView/SpecView.py", line
> 4, in <module>
> from ccpnmr.specView.gui.DisplayPanel import DEFAULT_COLORS
> File
> "/home/mahu/bin/ccpnmr/ccpnmr3.0/python/ccpnmr/specView/gui/DisplayPanel.py",
> line 24, in <module>
> from ccpnmr.specView.gui.SpecPanel import SpectrumPanel
> File "/home/mahu/bin/ccpnmr/ccpnmr3.0/python/ccpnmr/specView/gui/SpecPanel.py",
> line 12, in <module>
> from memops.qtgui.GlGraphicsView import GlGraphicsView
> File "/home/mahu/bin/ccpnmr/ccpnmr3.0/python/memops/qtgui/GlGraphicsView.py",
> line 2, in <module>
> from OpenGL import GL, GLU, GLUT
> File
> "/usr/local/lib/python2.7/dist-packages/PyOpenGL-3.0.2a5-py2.7.egg/OpenGL/GL/__init__.py",
> line 3, in <module>
> from OpenGL.GL.VERSION.GL_1_1 import *
> File
> "/usr/local/lib/python2.7/dist-packages/PyOpenGL-3.0.2a5-py2.7.egg/OpenGL/GL/VERSION/GL_1_1.py",
> line 12, in <module>
> from OpenGL.GL import glget
> File
> "/usr/local/lib/python2.7/dist-packages/PyOpenGL-3.0.2a5-py2.7.egg/OpenGL/GL/glget.py",
> line 13, in <module>
> from OpenGL.raw.GL.VERSION import GL_1_1 as simple
> File
> "/usr/local/lib/python2.7/dist-packages/PyOpenGL-3.0.2a5-py2.7.egg/OpenGL/raw/__init__.py",
> line 9, in <module>
> glColor4f = platform.createBaseFunction(
> NameError: name 'platform' is not defined
> mahu@mahu-desktop:~/bin/ccpnmr/ccpnmr3.0/bin$
>
>
> Matthias
>
>
> On 05/01/2012 03:20 PM, Wayne Boucher wrote:
> Hello,
>
> That is an odd one. It's a PyOpenGL problem. Tim is just now upgrading his
> Ubuntu to 12.04 but it is taking ages (hours and hours), so cannot try this out
> yet. But in the old Ubuntu it worked. If you run python (so just itself,
> interactively), can you try:
>
> > python
> >>> import OpenGL
> >>> OpenGL.__file__
>
> That should say something like .../lib/OpenGL/__init__.pyo. If you then edit
> .../lib/OpenGL/raw/OpenGL/__init__.py (assuming that file exists, which hopefully
> it does) then presumably it does not have lines like:
>
> # /usr/include/GL/gl.h 1328
> glColor4f = platform.createBaseFunction(
> 'glColor4f', dll=platform.GL, resultType=None,
> argTypes=[GLfloat,GLfloat,GLfloat,GLfloat],
> doc='glColor4f( GLfloat(red), GLfloat(green), GLfloat(blue), GLfloat(alpha) )
> -> None',
> argNames=('red', 'green', 'blue', 'alpha'),
> )
>
> It's an auto-generated file so it's hard to know how it could possibly have gone
> wrong.
>
> Wayne
>
> On Mon, 30 Apr 2012, Matthias Huber wrote:
>
> Dear all,
> I tried installing SpecView under Ubutu 12.04 64bit. I managed to get
> PySide and PyOpenGL installed and the installer script
> installSpecView.py ran without an error.
> When I try to start SpecView I get the following error message
> though. Any ideas what the problem could be?
>
> Matthias
>
>
> mahu@mahu-desktop:~/bin/ccpnmr/ccpnmr3.0/bin$ ./specView3
> Model read finished. Duration 1.74243617058
> Model validity check skipped
> Traceback (most recent call last):
> File
> "/home/mahu/bin/ccpnmr/ccpnmr3.0/python/ccpnmr/specView/SpecView.py",
> line 4, in <module>
> from ccpnmr.specView.gui.DisplayPanel import DEFAULT_COLORS
> File
> "/home/mahu/bin/ccpnmr/ccpnmr3.0/python/ccpnmr/specView/gui/DisplayPanel.py",
> line 25, in <module>
> from ccpnmr.specView.gui.Spec1dPanel import Spectrum1dPanel
> File
> "/home/mahu/bin/ccpnmr/ccpnmr3.0/python/ccpnmr/specView/gui/Spec1dPanel.py",
> line 49, in <module>
> glColor4f = raw.glColor4f
> AttributeError: 'module' object has no attribute 'glColor4f'
> Error in sys.excepthook:
> Traceback (most recent call last):
> File "/usr/lib/python2.7/dist-packages/apport_python_hook.py", line
> 64, in apport_excepthook
> from apport.fileutils import likely_packaged, get_recent_crashes
> File "/usr/lib/python2.7/dist-packages/apport/__init__.py", line 1,
> in <module>
> from apport.report import Report
> File "/usr/lib/python2.7/dist-packages/apport/report.py", line 18,
> in <module>
> import problem_report
> File "/usr/lib/python2.7/dist-packages/problem_report.py", line 14,
> in <module>
> import zlib, base64, time, sys, gzip, struct, os
> File "/usr/lib/python2.7/gzip.py", line 36, in <module>
> class GzipFile(io.BufferedIOBase):
> AttributeError: 'module' object has no attribute 'BufferedIOBase'
>
> Original exception was:
> Traceback (most recent call last):
> File
> "/home/mahu/bin/ccpnmr/ccpnmr3.0/python/ccpnmr/specView/SpecView.py",
> line 4, in <module>
> from ccpnmr.specView.gui.DisplayPanel import DEFAULT_COLORS
> File
> "/home/mahu/bin/ccpnmr/ccpnmr3.0/python/ccpnmr/specView/gui/DisplayPanel.py",
> line 25, in <module>
> from ccpnmr.specView.gui.Spec1dPanel import Spectrum1dPanel
> File
> "/home/mahu/bin/ccpnmr/ccpnmr3.0/python/ccpnmr/specView/gui/Spec1dPanel.py",
> line 49, in <module>
> glColor4f = raw.glColor4f
> AttributeError: 'module' object has no attribute 'glColor4f'
>
>
>
>
>
|