Skip to content
This repository has been archived by the owner on Sep 11, 2023. It is now read-only.

No backend available #6

Open
Lolmc0587 opened this issue Apr 16, 2023 · 1 comment
Open

No backend available #6

Lolmc0587 opened this issue Apr 16, 2023 · 1 comment

Comments

@Lolmc0587
Copy link

i already installed libusb from https://wiki.termux.com/wiki/Termux-usb
but cant start to work

@blinry
Copy link

blinry commented Jul 29, 2023

Same! The specific error I get when running termux-usb -r -e ./usbtest_rw1.py.sh /dev/bus/usb/001/002 is:

Run usbtest_rw1.py ...
./usbtest_rw1.py.sh: line 15: cd: /data/data/com.termux/files/home/tools/usb: No such file or directory
[D] __main__: args: ['usbtest_rw1.py', '7']
[E] usb.backend.libusb1: Error loading libusb 1.0 backend
Traceback (most recent call last):
  File "/data/data/com.termux/files/home/wip/termux-usb-python/venv/lib/python3.11/site-packages/usb/backend/libusb1.py", line 963, in get_backend
    _lib_object = _LibUSB(_lib)
                  ^^^^^^^^^^^^^
  File "/data/data/com.termux/files/home/wip/termux-usb-python/venv/lib/python3.11/site-packages/usb/backend/libusb1.py", line 717, in __init__
    _check(self.lib.libusb_init(byref(self.ctx)))
  File "/data/data/com.termux/files/home/wip/termux-usb-python/venv/lib/python3.11/site-packages/usb/backend/libusb1.py", line 604, in _check
    raise USBError(_strerror(ret), ret, _libusb_errno[ret])
usb.core.USBError: [Errno 5] Input/Output Error
Traceback (most recent call last):
  File "/data/data/com.termux/files/home/wip/termux-usb-python/usbtest_rw1.py", line 90, in <module>
    main(fd)
  File "/data/data/com.termux/files/home/wip/termux-usb-python/usbtest_rw1.py", line 18, in main
    device = device_from_fd(fd)
             ^^^^^^^^^^^^^^^^^^
  File "/data/data/com.termux/files/home/wip/termux-usb-python/usblib.py", line 101, in device_from_fd
    lib = backend.lib
          ^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'lib'

Deleting line 15 in the .sh script fixed the first error (I cloned the repo to a different location), but the rest of the error remains.

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

No branches or pull requests

2 participants