Comments (9)
Hi Lycos2,
I can not reproduce it here. Could you help me debug this please?
In the _ffi.py
file, please modify the Hub.locking_policy
setter function starting at line 488 so that it reads
@locking_policy.setter
def locking_policy(self, policy):
print('@@@', repr(policy), type(policy), type(policy).__module__, LockingPolicy.__module__, type(policy) is LockingPolicy)
if not isinstance(policy, LockingPolicy):
raise TypeError('expected LockingPolicy')
error = ErrorDetails()
libmyo.libmyo_set_locking_policy(self._handle[0], int(policy), error.handle)
error.raise_for_kind()
After that, run your Python script again and please paste the output in the console.
Please put any terminal output in code blocks like so:
```
Code here
```
from myo-python.
Hi Niklas,
thx for helping me, i did what you told me and this is the output:
runfile('C:/Users/ELYES/Desktop/myo_test/myo-python-master/01_hello_myo.py', wdir='C:/Users/ELYES/Desktop/myo_test/myo-python-master')
Traceback (most recent call last):
File "<ipython-input-1-8c68dda46196>", line 1, in <module>
runfile('C:/Users/ELYES/Desktop/myo_test/myo-python-master/01_hello_myo.py', wdir='C:/Users/ELYES/Desktop/myo_test/myo-python-master')
File "C:\Users\ELYES\Anaconda3\lib\site-packages\spyder\utils\site\sitecustomize.py", line 706, in runfile
execfile(filename, namespace)
File "C:\Users\ELYES\Anaconda3\lib\site-packages\spyder\utils\site\sitecustomize.py", line 103, in execfile
exec(compile(f.read(), filename, 'exec'), namespace)
File "C:/Users/ELYES/Desktop/myo_test/myo-python-master/01_hello_myo.py", line 48, in <module>
hub = myo.Hub()
File "C:\Users\ELYES\Desktop\myo_test\myo-python-master\myo\_ffi.py", line 469, in __init__
self.locking_policy = LockingPolicy.none
File "C:\Users\ELYES\Desktop\myo_test\myo-python-master\myo\_ffi.py", line 490, in locking_policy
print('@@@', repr(policy), type(policy), type(policy.__module__), LockingPolicy.__module__, type(policy) is LockingPolicy)
AttributeError: 'int' object has no attribute '__module__'
from myo-python.
Hm that is weird. Something seems to be wrong with the enumeration types. Can you tell me the exact version of Python you are using and the version of the nr
library that is installed?
python --version
python -c "import nr; print(nr.__version__)"
from myo-python.
(base) C:\Users\ELYES>python --version
Python 3.6.5 :: Anaconda, Inc.
(base) C:\Users\ELYES>python -c "import nr; print(nr.version)"
1.3.5
from myo-python.
How did you install myo-python
?
We require nr>=2.0.10
which should have been upgraded automatically when you installed it via Pip. 😕
pip install 'nr>=2.0.10'
should fix your problem.
from myo-python.
hi Niklas,
I updated nr to 'nr>=2.0.12' and i got that :
"""""
runfile('C:/Users/ELYES/Anaconda3/my_project/myo-python-master (1)/myo-python-master/01_hello_myo.py', wdir='C:/Users/ELYES/Anaconda3/my_project/myo-python-master (1)/myo-python-master')
Traceback (most recent call last):
File "", line 1, in
runfile('C:/Users/ELYES/Anaconda3/my_project/myo-python-master (1)/myo-python-master/01_hello_myo.py', wdir='C:/Users/ELYES/Anaconda3/my_project/myo-python-master (1)/myo-python-master')
File "C:\Users\ELYES\Anaconda3\lib\site-packages\spyder\utils\site\sitecustomize.py", line 706, in runfile
execfile(filename, namespace)
File "C:\Users\ELYES\Anaconda3\lib\site-packages\spyder\utils\site\sitecustomize.py", line 103, in execfile
exec(compile(f.read(), filename, 'exec'), namespace)
File "C:/Users/ELYES/Anaconda3/my_project/myo-python-master (1)/myo-python-master/01_hello_myo.py", line 28, in
import myo
File "C:\Users\ELYES\Anaconda3\my_project\myo-python-master (1)\myo-python-master\myo_init_.py", line 26, in
from ._ffi import *
File "C:\Users\ELYES\Anaconda3\my_project\myo-python-master (1)\myo-python-master\myo_ffi.py", line 72, in
class Result(nr.enum.Enumeration):
AttributeError: module 'nr' has no attribute 'enum'
""""""
from myo-python.
Uhm and what happens if you type import nr.enum
in your Python interpreter?
from myo-python.
I did that and it seems ok!!
""""""
(base) C:\Users\ELYES>python
Python 3.6.5 |Anaconda, Inc.| (default, Mar 29 2018, 13:32:41) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
import nr.enum
"""""
from myo-python.
Could you come over to https://gitter.im/NiklasRosenstein/myo-python? I have some more questions regarding your environment.
from myo-python.
Related Issues (20)
- Error in on_pose() when myo is unsynced HOT 2
- UTC timestamps for myo data? HOT 1
- ResultError: (<Result.error_runtime: 3>, b'Unable to connect to Myo Connect. Is Myo Connect running?') HOT 1
- OSError: [Errno 0] Error: 'myo\\libmyo.h'
- Myo SDK Download HOT 1
- Running in macOS: did not manage to locate a library called 'myo' HOT 1
- How to use the vibration method? HOT 1
- Get Myo data in the time HOT 3
- error 0x7e. cannot load library HOT 6
- 'Hub' object has no attribute 'shutdown' HOT 1
- SDK HOT 1
- myo sdk HOT 1
- Do You Have An Archive of The Windows 10 SDK? HOT 1
- live EMG HOT 2
- 03_live_EMG HOT 9
- AttributeError: module 'time' has no attribute 'clock' in myo/utils.py HOT 1
- What unit is the data in? millivolts or volts? HOT 4
- unable to download the Myo-SDK HOT 1
- Error loading library HOT 1
- Data streaming keeps buffering at around 15 seconds
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from myo-python.