New issue 473 by stodge: AttributeError: 'NoneType' object has no
attribute 'startswith'
http://code.google.com/p/pyglet/issues/detail?id=473
What steps will reproduce the problem?
1. Tried to run any of the graphical examples:
2. Example applications crash
Paste in the traceback or error message:
./multiple_windows.py
Traceback (most recent call last):
File "./multiple_windows.py", line 40, in <module>
from pyglet.gl import *
File "/usr/lib/python2.6/site-packages/pyglet/gl/__init__.py", line 510,
in <module>
import pyglet.window
File "/usr/lib/python2.6/site-packages/pyglet/window/__init__.py", line
1684, in <module>
gl._create_shadow_window()
File "/usr/lib/python2.6/site-packages/pyglet/gl/__init__.py", line 494,
in _create_shadow_window
_shadow_window = Window(width=1, height=1, visible=False)
File "/usr/lib/python2.6/site-packages/pyglet/window/xlib/__init__.py",
line 474, in __init__
super(XlibWindow, self).__init__(*args, **kwargs)
File "/usr/lib/python2.6/site-packages/pyglet/window/__init__.py", line
686, in __init__
self._create()
File "/usr/lib/python2.6/site-packages/pyglet/window/xlib/__init__.py",
line 683, in _create
self.switch_to()
File "/usr/lib/python2.6/site-packages/pyglet/window/xlib/__init__.py",
line 781, in switch_to
self._context.set_current()
File "/usr/lib/python2.6/site-packages/pyglet/gl/__init__.py", line 347,
in set_current
setattr(self, attr, check(self._info))
File "/usr/lib/python2.6/site-packages/pyglet/gl/__init__.py", line 314,
in <lambda>
lambda info: info.get_renderer().startswith('ATI Radeon X')),
AttributeError: 'NoneType' object has no attribute 'startswith'
pyglet 1.1 with Python 2.5: Paste in the output of `python -m pyglet.info`
Other: Paste in the output of tools/gl_info.py (included in source distro):
See attachment for output of pyglet.info.
Any additional info (platform/language/hardware) that may be relevant?
Fedora 12 running on a Dell M4300 laptop.
gl_info.py crashes.
Attachments:
pyglet_info.txt 6.0 KB
--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings
Comment #1 on issue 473 by chardster: AttributeError: 'NoneType' object has
no attribute 'startswith'
http://code.google.com/p/pyglet/issues/detail?id=473
This generally happens because the Context.set_current is called before the
real
(platform specific) context has been initialised. Poking through the code I
can only
presume that we end up with an instance of BaseXlibContext instead of any
of its
subclasses.
stodge: Could you confirm the types of w1.context and w2.context from the
multiple_windows.py example for your setup? Take a copy of the file and
add 'print
type(w1.context), type(w2.context)' before 'pyglet.app.run()'
Tried that but it doesn't help. The crash occurs "inside" the import:
from pyglet.gl import *
So my print statements are never reached.
Anything else I can report/find for you? Cheers
I got the same on Fedora 12 with NVIDIA card and nouveau driver (for now it
lacks 3D
support).
Try proprietary driver.
Sorry - forgot to mention that this was the proprietary NVIDIA driver.
what is output of:
$ glxinfo | egrep "vendor|OpenGL"
Ah:
glxinfo | egrep "vendor|OpenGL"
Error: glXCreateContext failed