[Python-talk] mat3d error
Labitt, Bruce
labittb1 at tycoelectronics.com
Thu Sep 11 11:49:05 EDT 2008
As described earlier, I have this error message when I try to save the
graphics that the mat3d_ex4.py file generates.
Exception in Tkinter callback
Traceback (most recent call last):
File "/usr/lib64/python2.4/lib-tk/Tkinter.py", line 1345, in __call__
return self.func(*args)
File "/home/me/mypython/mat3d/mat3d.py", line 637, in save
self.SaveTo(fileName)
File "/home/me/mypython/mat3d/mat3d.py", line 645, in SaveTo
data = glReadPixels(0, 0, width, height, GL_RGB, GL_UNSIGNED_BYTE)
File
"/usr/lib/python2.4/site-packages/PyOpenGL-3.0.0b5-py2.4.egg/OpenGL/GL/i
mages.py", line 323, in glReadPixels
ctypes.c_void_p( imageData )
ArgumentError: argument 3: exceptions.TypeError: wrong type
I have found the file /usr/lib64/python2.4/config/Setup. It looks like
this file is used to add features/links to python.
Line 300 of setup describes the _tkinter module. It says to uncomment
as required. This is what I have: is it right?
# The _tkinter module.
#
# The command for _tkinter is long and site specific. Please
# uncomment and/or edit those parts as indicated. If you don't have a
# specific extension (e.g. Tix or BLT), leave the corresponding line
# commented out. (Leave the trailing backslashes in! If you
# experience strange errors, you may want to join all uncommented
# lines and remove the backslashes -- the backslash interpretation is
# done by the shell's "read" command and it may not be implemented on
# every system.
# *** Always uncomment this (leave the leading underscore in!):
_tkinter _tkinter.c tkappinit.c -DWITH_APPINIT \
# *** Uncomment and edit to reflect where your Tcl/Tk libraries are:
# -L/usr/local/lib \
# *** Uncomment and edit to reflect where your Tcl/Tk headers are:
# -I/usr/local/include \
# *** Uncomment and edit to reflect where your X11 header files are:
# -I/usr/X11R6/include \
# *** Or uncomment this for Solaris:
# -I/usr/openwin/include \
# *** Uncomment and edit for Tix extension only:
-DWITH_TIX -ltix \
# *** Uncomment and edit for BLT extension only:
# -DWITH_BLT -I/usr/local/blt/blt8.0-unoff/include -lBLT8.0 \
# *** Uncomment and edit for PIL (TkImaging) extension only:
# (See http://www.pythonware.com/products/pil/ for more info)
# -DWITH_PIL -I../Extensions/Imaging/libImaging tkImaging.c \
# *** Uncomment and edit for TOGL extension only:
# -DWITH_TOGL togl.c \
# *** Uncomment and edit to reflect your Tcl/Tk versions:
-ltk -ltcl \
# *** Uncomment and edit to reflect where your X11 libraries are:
# -L/usr/X11R6/lib \
# *** Or uncomment this for Solaris:
# -L/usr/openwin/lib \
# *** Uncomment these for TOGL extension only:
# -lGL -lGLU -lXext -lXmu \
# *** Uncomment for AIX:
# -lld \
# *** Always uncomment this; X11 libraries to link with:
-lX11
My tcl libraries are in /usr/lib64/tclx8.4
I think my tcl headers are in /usr/include/tcl-private and /tk-private?
as well as /usr/include ?
Should I be looking into this or something else?
-Bruce
More information about the Python-talk
mailing list