Skip to content

Instantly share code, notes, and snippets.

@stsievert
Created October 16, 2014 22:00
Show Gist options
  • Save stsievert/4deb6d72437dce786ccf to your computer and use it in GitHub Desktop.
Save stsievert/4deb6d72437dce786ccf to your computer and use it in GitHub Desktop.
myo-python errors
> ipython script.py
---------------------------------------------------------------------------
OSError Traceback (most recent call last)
/Users/scott/Developer/gesture/gesture_mac/python/script.py in <module>()
1
2 import myo
----> 3 myo.init()
4
5 from myo.six import print_
/Users/scott/Developer/gesture/gesture_mac/python/myo/lowlevel.py in init(dist_path, add_to_path)
132 from myo.localdist import dist_path
133 except ImportError as exc:
--> 134 reraise(exc_info)
135 return
136
/Users/scott/Developer/gesture/gesture_mac/python/myo/lowlevel.py in init(dist_path, add_to_path)
124 # Load the library and initialize the required contents.
125 try:
--> 126 lib = ctypes.cdll.LoadLibrary(lib_name)
127 except (OSError):#, WindowsError):
128 exc_info = sys.exc_info()
/Users/scott/anaconda/lib/python2.7/ctypes/__init__.pyc in LoadLibrary(self, name)
441
442 def LoadLibrary(self, name):
--> 443 return self._dlltype(name)
444
445 cdll = LibraryLoader(CDLL)
/Users/scott/anaconda/lib/python2.7/ctypes/__init__.pyc in __init__(self, name, mode, handle, use_errno, use_last_error)
363
364 if handle is None:
--> 365 self._handle = _dlopen(self._name, mode)
366 else:
367 self._handle = handle
OSError: dlopen(myo, 6): no suitable image found. Did find:
myo: not a file
> ipython example_script.py
---------------------------------------------------------------------------
NameError Traceback (most recent call last)
/Users/scott/Developer/gesture/gesture_mac/python/script.py in <module>()
1
2 import myo
----> 3 myo.init()
4
5 from myo.six import print_
/Users/scott/Developer/gesture/gesture_mac/python/myo/lowlevel.py in init(dist_path, add_to_path)
125 try:
126 lib = ctypes.cdll.LoadLibrary(lib_name)
--> 127 except (OSError, WindowsError):
128 exc_info = sys.exc_info()
129
NameError: global name 'WindowsError' is not defined
After commenting out `WindowsError` on line 127 in `myo-python/myo/lowlevel.py`, I get the follwoing error:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment