Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

usb.core.USBError: [Errno 13] Access denied (insufficient permissions) #2

Open
hellocatfood opened this issue Jul 1, 2024 · 1 comment

Comments

@hellocatfood
Copy link

I'm trying to run your script on Ubuntu 24.04 but when I do the script crashes with the following output:

gbopyrator --dump-save out.sav

            __________     ____                         __            
           / ____/ __ )   / __ \____  __  ___________ _/ /_____  _____
          / / __/ __  |  / / / / __ \/ / / / ___/ __ `/ __/ __ \/ ___/
         / /_/ / /_/ /  / /_/ / /_/ / /_/ / /  / /_/ / /_/ /_/ / /    
         \____/_____/   \____/ .___/\__, /_/   \__,_/\__/\____/_/     
                            /_/    /____/                             
            
Traceback (most recent call last):
  File "/home/hellocatfood/.venv/bin/gbopyrator", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/home/hellocatfood/.venv/lib/python3.12/site-packages/gbopyrator/gbopyrator.py", line 32, in main
    cr.initialize_reader(blocking=True,timeout=10)
  File "/home/hellocatfood/.venv/lib/python3.12/site-packages/gbopyrator/cartridge_utils.py", line 67, in initialize_reader
    self.gbop_device = cu.init_gb_operator(dev)
                       ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/hellocatfood/.venv/lib/python3.12/site-packages/gbopyrator/coms_utils.py", line 284, in init_gb_operator
    if gbop_device.is_kernel_driver_active(0):
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/hellocatfood/.venv/lib/python3.12/site-packages/usb/core.py", line 1107, in is_kernel_driver_active
    self._ctx.managed_open()
  File "/home/hellocatfood/.venv/lib/python3.12/site-packages/usb/core.py", line 113, in wrapper
    return f(self, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/hellocatfood/.venv/lib/python3.12/site-packages/usb/core.py", line 131, in managed_open
    self.handle = self.backend.open_device(self.dev)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/hellocatfood/.venv/lib/python3.12/site-packages/usb/backend/libusb1.py", line 804, in open_device
    return _DeviceHandle(dev)
           ^^^^^^^^^^^^^^^^^^
  File "/home/hellocatfood/.venv/lib/python3.12/site-packages/usb/backend/libusb1.py", line 652, in __init__
    _check(_lib.libusb_open(self.devid, byref(self.handle)))
  File "/home/hellocatfood/.venv/lib/python3.12/site-packages/usb/backend/libusb1.py", line 604, in _check
    raise USBError(_strerror(ret), ret, _libusb_errno[ret])
usb.core.USBError: [Errno 13] Access denied (insufficient permissions)
@petrutoader
Copy link

Hey! You can try this tutorial, you're having permission issues:

https://support.epilogue.co/hc/en-us/articles/4403827118738-How-can-I-connect-my-Operator-device-on-Linux-under-a-non-root-user

Or you can quickly run chmod 777 the device in the /dev folder, it might be something like ttyS0 or ttyACM0 or some other value. But the safest way is by following the tutorial.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants