[MacPorts] #38666: Unable to successfully import lightblue after installation

MacPorts noreply at macports.org
Sat Apr 6 13:35:26 PDT 2013


#38666: Unable to successfully import lightblue after installation
-----------------------------+-----------------------------
  Reporter:  eroninjapan@…   |      Owner:  michael.klein@…
      Type:  defect          |     Status:  new
  Priority:  Normal          |  Milestone:
 Component:  ports           |    Version:  2.1.3
Resolution:                  |   Keywords:
      Port:  py27-lightblue  |
-----------------------------+-----------------------------

Comment (by sujitkrao@…):

 I'm having the same problem on 10.7.5, and looked a bit through the
 LightBlue source. The Python class _AsyncDeviceInquiry is a wrapper around
 the Objective-C class IOBluetoothDeviceInquiry and protocol
 IOBluetoothDeviceInquiryDelegate. It implements some, but not all, of the
 methods of IOBluetoothDeviceInquiryDelegate, and has a member variable
 instance IOBluetoothDeviceInquiry that it passes itself to on
 initialization. Before 10.7, IOBluetoothDeviceInquiryDelegate was an
 informal protocol, so all of the methods were optional. In 10.7 and later,
 IOBluetoothDeviceInquiryDelegate is a formal protocol with all of its
 methods explicitly declared optional, and it like PyObjC doesn't handle
 the optional methods correctly and throws an exception when not everything
 is implemented. I added the missing methods to _AsyncDeviceInquiry with
 empty implementations and it seemed to work:

 {{{
 def deviceInquiryDeviceNameUpdated_device_devicesRemaining_(self, sender,
 device, devicesRemaining):
     pass

 def deviceInquiryUpdatingDeviceNamesStarted_devicesRemaining_(self,
 sender, devicesRemaining):
     pass
 }}}

 This is my first time messing with Objective-C and PyObjC, so the problem
 might actually be different, but I was able to import LightBlue after I
 added the methods. I haven't tested anything else.

-- 
Ticket URL: <https://trac.macports.org/ticket/38666#comment:6>
MacPorts <http://www.macports.org/>
Ports system for OS X


More information about the macports-tickets mailing list