OSError attempting to load quicktime on 64 bit OS X 10.7.4

35 views
Skip to first unread message

Joe VanAndel

unread,
May 12, 2012, 5:33:22 PM5/12/12
to pyglet...@googlegroups.com
I'm running Enthough 64 bit Python on Mac OS X, 10.7.4.  When I run one of the 'enaml' widget_gallery example programs, it tries to load quicktime, which is apparently only available as a 32 bit framework.  This results in a crash.

OSError: dlopen(/System/Library/Frameworks/QuickTime.framework/QuickTime, 6): no suitable image found.  Did find:
/System/Library/Frameworks/QuickTime.framework/QuickTime: mach-o, but wrong architecture
/System/Library/Frameworks/QuickTime.framework/QuickTime: mach-o, but wrong architecture

This application works perfectly fine without Quicktime, but crashes trying to load 32 bit Quicktime on a 64bit OS.

I've tested the following patch, which maps OSError to an ImportError.

Could one of the developers commit this to the source repository?

*** lib.py.orig 2012-05-12 15:10:17.000000000 -0600
--- lib.py 2012-05-12 15:11:56.000000000 -0600
***************
*** 225,231 ****
      def load_framework(self, path):
          realpath = self.find_framework(path)
          if realpath:
!             lib = ctypes.cdll.LoadLibrary(realpath)
              if _debug_lib:
                  print realpath
              if _debug_trace:
--- 225,234 ----
      def load_framework(self, path):
          realpath = self.find_framework(path)
          if realpath:
!    try:
! lib = ctypes.cdll.LoadLibrary(realpath)
!             except OSError:
! raise ImportError("Can't find framework %s." % path)
              if _debug_lib:
                  print realpath
              if _debug_trace:
Reply all
Reply to author
Forward
0 new messages