getting 'ValueError: not open' when trying to open a connection with hidapi/hid on OSX

getting 'ValueError: not open' when trying to open a connection with hidapi/hid on OSX

我正在使用 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,所以我有点茫然

通常,hidapi 出于某种原因需要 mac 的 sudo 权限。即使你是 运行 Ubuntu mac.