2012-01-25 5 views
3

Mac OS X 10.7.2에서 파이썬을 통해 wiimote에 연결하려고합니다.lightblue 파이썬 모듈이 Mac에서 작동하지 않습니다.

나는 lightblue를 사용하려고합니다. 실행 중일 때 : import lightblue 파이썬이 나에게이 오류를 준다.

>>> import lightblue 
Traceback (most recent call last): 
    File "<stdin>", line 1, in <module> 
    File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/lightblue/__init__.py", line 160, in <module> 
    from _lightblue import * 
    File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/lightblue/_lightblue.py", line 27, in <module> 
    import _IOBluetooth 
    File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/lightblue/_IOBluetooth.py", line 47, in <module> 
    globals=globals()) 
    File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/PyObjC/objc/_bridgesupport.py", line 142, in initFrameworkWrapper 
    _parseBridgeSupport(data, globals, frameworkName) 
    File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/PyObjC/objc/_bridgesupport.py", line 42, in _parseBridgeSupport 
    objc.parseBridgeSupport(data, globals, frameworkName, *args, **kwds) 
ValueError: cftype for 'IOBluetoothDeviceInquiryRef' must include gettypeid_func, tollfree or both 

나는 여기에 비슷한 문제가 하나 발견 http://python.6.n6.nabble.com/Python-bridgesupport-issue-on-Lion-td2161049.html#a32196961를하지만 이미 연한 파랑의 파일을 사용하고있는 나에게 보이기 때문에 대답은, 많은 나에게 도움이되지 않습니다. 어떤 제안?

답변

0

Apple의 gen_bridge_metadata 스크립트로 버그가있는 것 같습니다. 생성 된 파일을 직접 편집하여 오류를 제거 할 수 있습니다.

/System/Library/Frameworks/IOBluetooth.framework/Versions/Current/Resources/BridgeSupport/IOBluetooth.bridgesupport을 열고 <cftype으로 시작하는 줄을 삭제하십시오.

+0

ImportError :/Library/Frameworks/LightAquaBlue.framework에서 LightAquaBlue 프레임 워크를로드 할 수 없습니다. – nick

관련 문제