0-1-0 / lightblue-0.4

LightBlue python module that compiles successful on OS X 10.8 (Mountain Lion)
GNU General Public License v3.0
96 stars 92 forks source link

Issue with OS X yosemite #8

Open Totothejuggler opened 9 years ago

Totothejuggler commented 9 years ago

Hi

I have been getting this error whenever I try to import the lightblue module

Traceback (most recent call last): File "", line 1, in File "/Library/Python/2.7/site-packages/lightblue/init.py", line 160, in from _lightblue import * File "/Library/Python/2.7/site-packages/lightblue/_lightblue.py", line 296, in class _SDPQueryRunner(Foundation.NSObject): objc.error: _SDPQueryRunner is overriding existing Objective-C class

I have tried the 2nd suggestion found here http://stackoverflow.com/questions/22279913/how-to-install-either-pybluez-or-lightblue-on-osx-10-9-mavericks but no luck.

Any help would be appreciated :)

aodock commented 9 years ago

Hi, I followed as said on link. It tool a lot to download at first, and took really long time to complete the installation with many warnings. Later when i tried to import lightblue i got the following error

In [1]:  import lightblue
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/objc/_bridgesupport.py:643: RuntimeWarning: Error parsing BridgeSupport data for IOBluetooth: PyObjCRT_SkipTypeSpec: Got '0x29' at end of union encoding, expecting '0x29'
  warnings.warn("Error parsing BridgeSupport data for %s: %s" % (frameworkName, e), RuntimeWarning)

Later i tried to discover devices,

In [2]:  lightblue.finddevices()
Exception AttributeError: "'_SyncDeviceInquiry' object has no attribute '_inquiry'" in <bound method _SyncDeviceInquiry.__del__ of <lightblue._lightblue._SyncDeviceInquiry object at 0x104052450>> ignored
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-8-0400d43f1d09> in <module>()
----> 1 lightblue.finddevices()

/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/lightblue/_lightblue.pyc in finddevices(getnames, length)
     44 
     45 def finddevices(getnames=True, length=10):
---> 46     inquiry = _SyncDeviceInquiry()
     47     inquiry.run(getnames, length)
     48     devices = inquiry.getfounddevices()

/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/lightblue/_lightblue.pyc in __init__(self)
    334         super(_SyncDeviceInquiry, self).__init__()
    335 
--> 336         self._inquiry = _AsyncDeviceInquiry.alloc().init()
    337         self._inquiry.cb_completed = self._inquirycomplete
    338 

/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/lightblue/_lightblue.pyc in init(self)
    406                 "Mac OS X 10.4, are you running an earlier version?")
    407 
--> 408         self = super(_AsyncDeviceInquiry, self).init()
    409         self._inquiry = \
    410             _IOBluetooth.IOBluetoothDeviceInquiry.inquiryWithDelegate_(self)

AttributeError: 'super' object has no attribute 'init'
aodock commented 9 years ago

Hi, installing this helped me finally

SejalChauhan commented 8 years ago

I am not able to install the package successfully : error -

clang: error: no such file or directory: 'Modules/_imagekit.m' clang: error: no input files error: command 'clang' failed with exit status 1 Installing 'pyobjc-framework-Quartz' failed (status 1)

lidio601 commented 8 years ago

@SejalChauhan try the pyobjc-3.0.3 release. It worked for me

SejalChauhan commented 8 years ago

Yes, after tweaking some settings, it worked for me too. Thanks!