arachnidlabs / minishift-python

Python library for interfacing with the minishift.
BSD 3-Clause "New" or "Revised" License
3 stars 4 forks source link

IOError: open failed #4

Closed gauntface closed 9 years ago

gauntface commented 9 years ago

Hey,

I've just put together one of the minishifts and manage to get the minishift lib installed through pip after some wrangling, but I'm getting an IOError, does anyone have any ideas?

$ python -m minishift.minishiftd 32                                       
Traceback (most recent call last):
  File "/usr/lib/python2.7/runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/usr/local/lib/python2.7/dist-packages/minishift/minishiftd.py", line 156, in <module>
    main(args)
  File "/usr/local/lib/python2.7/dist-packages/minishift/minishiftd.py", line 126, in main
    interface = MCP2210Interface(int(args.vid), int(args.pid))
  File "/usr/local/lib/python2.7/dist-packages/minishift/draw.py", line 22, in __init__
    self.device = mcp2210.MCP2210(vid, pid)
  File "/usr/local/lib/python2.7/dist-packages/mcp2210/device.py", line 119, in __init__
    self.hid.open(vid, pid)
  File "hid.pyx", line 48, in hid.device.open (hid.c:1363)
IOError: open failed

I've tried different USB cables and ports. I tried running lsusb to see if the device was listed there but no joy.

I'm on Ubuntu - latest stable release.

Does anyone have any ideas what could be wrong?

gauntface commented 9 years ago

Figured out the issue was with Ubuntu.

The device showed up when I ran udevadm monitor --udev and then plugged in the minishift, so did some searching and it seems like something odd with the udev rules which meant only root user could access the device, so running sudo python -m minishift.minishiftd 32 worked.