1

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

4

1 回答 1

1

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

于 2016-09-20T21:03:29.007 回答