SivyerLab / pyCrafter4500

Python USB controller for the TI LCR4500EVM
https://pycrafter4500.readthedocs.io/en/latest/
GNU General Public License v3.0
16 stars 16 forks source link

USBError: [Errno 13] Access denied (insufficient permissions) Ubuntu 16.04 #9

Closed nikhil4595 closed 5 years ago

nikhil4595 commented 5 years ago

Hi ,

On running the pycrafter4500 module in my python terminal in Linux, I kept getting the following error. Any ideas, what might be the issue here ?

In[4]: import pycrafter4500 In[5]: pycrafter4500.power_up() Traceback (most recent call last): File "/home/nikhil/Complete pycharm project/untitled2/venv2/lib/python3.5/site-packages/IPython/core/interactiveshell.py", line 3296, in run_code exec(code_obj, self.user_global_ns, self.user_ns) File "<ipython-input-5-08c5317d7bd7>", line 1, in <module> pycrafter4500.power_up() File "/home/nikhil/Complete pycharm project/untitled2/venv2/lib/python3.5/site-packages/pycrafter4500/pycrafter4500.py", line 524, in power_up with connect_usb() as lcr: File "/usr/lib/python3.5/contextlib.py", line 59, in __enter__ return next(self.gen) File "/home/nikhil/Complete pycharm project/untitled2/venv2/lib/python3.5/site-packages/pycrafter4500/pycrafter4500.py", line 82, in connect_usb device.set_configuration() File "/home/nikhil/Complete pycharm project/untitled2/venv2/lib/python3.5/site-packages/usb/core.py", line 869, in set_configuration self._ctx.managed_set_configuration(self, configuration) File "/home/nikhil/Complete pycharm project/untitled2/venv2/lib/python3.5/site-packages/usb/core.py", line 102, in wrapper return f(self, *args, **kwargs) File "/home/nikhil/Complete pycharm project/untitled2/venv2/lib/python3.5/site-packages/usb/core.py", line 147, in managed_set_configuration self.managed_open() File "/home/nikhil/Complete pycharm project/untitled2/venv2/lib/python3.5/site-packages/usb/core.py", line 102, in wrapper return f(self, *args, **kwargs) File "/home/nikhil/Complete pycharm project/untitled2/venv2/lib/python3.5/site-packages/usb/core.py", line 120, in managed_open self.handle = self.backend.open_device(self.dev) File "/home/nikhil/Complete pycharm project/untitled2/venv2/lib/python3.5/site-packages/usb/backend/libusb1.py", line 786, in open_device return _DeviceHandle(dev) File "/home/nikhil/Complete pycharm project/untitled2/venv2/lib/python3.5/site-packages/usb/backend/libusb1.py", line 643, in __init__ _check(_lib.libusb_open(self.devid, byref(self.handle))) File "/home/nikhil/Complete pycharm project/untitled2/venv2/lib/python3.5/site-packages/usb/backend/libusb1.py", line 595, in _check raise USBError(_strerror(ret), ret, _libusb_errno[ret]) usb.core.USBError: [Errno 13] Access denied (insufficient permissions) Thanks in advance

Regards, Nikhil Shankar

arrrobase commented 5 years ago

I haven't done any testing on Linux with this, but a guess since this is a permission error on Linux, that maybe you need to be using sudo?