views:

92

answers:

1

I have this problem. Any idea?

from OpenGL.raw.GLUT import *
      File "/usr/lib/python2.6/site-packages/OpenGL/raw/GLUT/__init__.py", line 6, in <module>
        from OpenGL.raw.GLUT.constants import *
      File "/usr/lib/python2.6/site-packages/OpenGL/raw/GLUT/constants.py", line 7, in <module>
        from OpenGL import platform, arrays
      File "/usr/lib/python2.6/site-packages/OpenGL/platform/__init__.py", line 36, in <module>
        _load()
      File "/usr/lib/python2.6/site-packages/OpenGL/platform/__init__.py", line 27, in _load
        plugin_class = plugin.load()
      File "/usr/lib/python2.6/site-packages/OpenGL/plugins.py", line 14, in load
        return importByName( self.import_path )
      File "/usr/lib/python2.6/site-packages/OpenGL/plugins.py", line 28, in importByName
        module = __import__( ".".join(moduleName), {}, {}, moduleName)
      File "/usr/lib/python2.6/site-packages/OpenGL/platform/glx.py", line 3, in <module>
        from OpenGL.platform import baseplatform, ctypesloader
      File "/usr/lib/python2.6/site-packages/OpenGL/platform/baseplatform.py", line 4, in <module>
        from OpenGL.platform import ctypesloader
      File "/usr/lib/python2.6/site-packages/OpenGL/platform/ctypesloader.py", line 6, in <module>
        import ctypes, logging, os
      File "/usr/lib/python2.6/logging/__init__.py", line 31, in <module>
        import sys, os, types, time, string, cStringIO, traceback
      File "string.py", line 3, in <module>
        chars=set(string.printable),
    AttributeError: 'module' object has no attribute 'printable'
+2  A: 

You have a file called string.py in the current directory. It's interfering with the standard library module of the same name. Rename the .py file, and remove the string.pyc file that was created.

Thomas Wouters
Thanks ! I readed about "AttributeError: 'module' object has no attribute". I forgot about that script. Maybe in future python will know what about libs.
Catalin Festila