Getting Started Problem With Hello World Example

108 views
Skip to first unread message

frank

unread,
Sep 21, 2012, 2:37:30 PM9/21/12
to pyglet-users
Hi,

Trying to jump in and learn and hit a problem. Don't know what I did
but Hello World bombs on me.

Windows XP, Pyglet 1.1.4, Python 2.6.8 under Cygwin, installed to site
packages directory

Have tried running both interactively and from a script file. The
problem happens when the interpreter hits the label command.
Interactively I can see the window show up on screen and stay there.
Here's the output, any help would be greatly appreciated.

Traceback (most recent call last):
File "h.py", line 3, in <module>
import pyglet.image.codecs.gdiplus
File "/usr/lib/python2.6/site-packages/pyglet/image/__init__.py",
line 2537, in <module>
_codecs.add_default_image_codecs()
File "/usr/lib/python2.6/site-packages/pyglet/image/codecs/
__init__.py", line 203, in add_default_image_codecs
import pyglet.image.codecs.gdkpixbuf2
File "/usr/lib/python2.6/site-packages/pyglet/image/codecs/
gdkpixbuf2.py", line 163, in <module>
init()
File "/usr/lib/python2.6/site-packages/pyglet/image/codecs/
gdkpixbuf2.py", line 161, in init
gdk.g_type_init()
File "/usr/lib/python2.6/ctypes/__init__.py", line 366, in
__getattr__
func = self.__getitem__(name)
File "/usr/lib/python2.6/ctypes/__init__.py", line 371, in
__getitem__
func = self._FuncPtr((name_or_ordinal, self))
AttributeError: function 'g_type_init' not found (▒q▒)

Best,
Frank

Adam Griffiths

unread,
Sep 22, 2012, 11:53:38 PM9/22/12
to pyglet...@googlegroups.com
I can't really be sure, but the error seems to be in GDI calls.

Have you installed the windows python support libraries?

pip search pywin32
pywin32                   - Python extensions for Windows

This page also has a different installer for windows pythons
"You may also wish to download Win32all, Mark Hammond's add-on that includes the Win32 API, COM support, and Pythonwin extensions. It's available from the pywin32 project on SourceForge."

On windows, I used these downloads

Cheers,
Adam

Lane, Frank L

unread,
Sep 24, 2012, 11:09:38 AM9/24/12
to pyglet...@googlegroups.com

Thank you Adam, trying these ideas out now!

 

Best,

Frank

--
You received this message because you are subscribed to the Google Groups "pyglet-users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/pyglet-users/-/-l8s0g40wDAJ.
To post to this group, send email to pyglet...@googlegroups.com.
To unsubscribe from this group, send email to pyglet-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/pyglet-users?hl=en.

Reply all
Reply to author
Forward
0 new messages