Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

live EMG #90

Open
250955967 opened this issue Dec 30, 2020 · 2 comments
Open

live EMG #90

250955967 opened this issue Dec 30, 2020 · 2 comments

Comments

@250955967
Copy link

Hi Niklas,
I am a novice in Myo-python. Recently when I run the live_EMG.ipynb, this error came to me.


AttributeError Traceback (most recent call last)
in
1 if name == 'main':
----> 2 main()

in main()
83 hub = myo.Hub()
84 listener = EmgCollector(512)
---> 85 with hub.run_in_background(listener.on_event):
86 Plot(listener).main()

AttributeError: 'Hub' object has no attribute 'run_in_background'

Would you please tell me how to solve this problem?

Thank you so much!
Deng

@NiklasRosenstein
Copy link
Owner

Hello @250955967 , do you have the latest version of the library installed?

Try pip install --upgrade myo-python, or inspect the version number using python -c 'import myo; print(myo.__version__)'

@250955967
Copy link
Author

Hello Niklas,

Yes, I did not have the latest version. I have updated the version via your method. It works.
However, it cannot load the library now. In the previous version, it can load the library.


OSError Traceback (most recent call last)
in
1 if name == 'main':
----> 2 main()

in main()
80 def main():
81 #myo.init()
---> 82 myo.init(r'D:\project\EMG\Myo\myo-sdk-win-0.9.0\bin')
83 hub = myo.Hub()
84 listener = EmgCollector(512)

~\anaconda3\lib\site-packages\myo_ffi.py in init(lib_name, bin_path, sdk_path)
236
237 global libmyo
--> 238 libmyo = ffi.dlopen(lib_name)
239
240

~\anaconda3\lib\site-packages\cffi\api.py in dlopen(self, name, flags)
148 "or an already-opened 'void *' handle")
149 with self._lock:
--> 150 lib, function_cache = _make_ffi_library(self, name, flags)
151 self._function_caches.append(function_cache)
152 self._libraries.append(lib)

~\anaconda3\lib\site-packages\cffi\api.py in _make_ffi_library(ffi, libname, flags)
830 def _make_ffi_library(ffi, libname, flags):
831 backend = ffi._backend
--> 832 backendlib = _load_backend_lib(backend, libname, flags)
833 #
834 def accessor_function(name):

~\anaconda3\lib\site-packages\cffi\api.py in _load_backend_lib(backend, name, flags)
825 if first_error is not None:
826 msg = "%s. Additionally, %s" % (first_error, msg)
--> 827 raise OSError(msg)
828 return backend.load_library(path, flags)
829

OSError: cannot load library 'D:\project\EMG\Myo\myo-sdk-win-0.9.0\bin': error 0x7e. Additionally, ctypes.util.find_library() did not manage to locate a library called 'D:\project\EMG\Myo\myo-sdk-win-0.9.0\bin'

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants