尝试在OSX上打开与hidapi / hid的连接时出现'ValueError:not open'

时间:2016-05-11 21:52:07

标签: python macos hid hidapi

我正在使用python在OSX El Capitan上打开hid / hidapi(错误是相同的两种方式)连接。但是,它给了我以下错误堆栈跟踪:

 Traceback (most recent call last):
  File "/Users/johndoe/Library/Python/2.7/lib/python/site-packages/gevent/greenlet.py", line 534, in run
    result = self._run(*self.args, **self.kwargs)
  File "/Users/johndoe/IdeaProjects/projectname/emokit-master/python/emokit/emotiv.py", line 403, in setup
    self.setup_darwin()
  File "/Users/johndoe/IdeaProjects/projectname/emokit-master/python/emokit/emotiv.py", line 526, in setup_darwin
    data = hidraw.read(34)
  File "hid.pyx", line 105, in hid.device.read (hid.c:2338)
ValueError: not open
<Greenlet at 0x10f7f1b90: <bound method Emotiv.setup of <emokit.emotiv.Emotiv object at 0x10f532c50>>> failed with ValueError

我找不到任何关于此的东西,并且通常不使用OSX或python,所以我有点亏本

1 个答案:

答案 0 :(得分:1)

通常,hidapi出于某种原因需要在mac上使用sudo权限。即使您在Mac上运行Ubuntu。