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

not working in Win10 + python 3.9.5 + libusb 1.0.24b1 #10

Open
aromanowski opened this issue Dec 17, 2021 · 1 comment
Open

not working in Win10 + python 3.9.5 + libusb 1.0.24b1 #10

aromanowski opened this issue Dec 17, 2021 · 1 comment

Comments

@aromanowski
Copy link

Hi!
I just tried to run this on Win10 after following the install instructions and I get the following error:

(base) C:\>tc420 time-sync
Traceback (most recent call last):
  File "c:\miniconda3\lib\runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "c:\miniconda3\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "C:\Miniconda3\Scripts\tc420.exe\__main__.py", line 7, in <module>
  File "c:\miniconda3\lib\site-packages\tc420\__main__.py", line 300, in main
    cmd_group()
  File "c:\miniconda3\lib\site-packages\click\core.py", line 1128, in __call__
    return self.main(*args, **kwargs)
  File "c:\miniconda3\lib\site-packages\click\core.py", line 1053, in main
    rv = self.invoke(ctx)
  File "c:\miniconda3\lib\site-packages\click\core.py", line 1668, in invoke
    super().invoke(ctx)
  File "c:\miniconda3\lib\site-packages\click\core.py", line 1395, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "c:\miniconda3\lib\site-packages\click\core.py", line 754, in invoke
    return __callback(*args, **kwargs)
  File "c:\miniconda3\lib\site-packages\click\decorators.py", line 26, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "c:\miniconda3\lib\site-packages\tc420\__main__.py", line 79, in cmd_group
    ctx.obj.dev = TC420()
  File "c:\miniconda3\lib\site-packages\tc420\tc420.py", line 301, in __init__
    if self.dev.is_kernel_driver_active(0):
  File "c:\miniconda3\lib\site-packages\usb\core.py", line 1108, in is_kernel_driver_active
    return self._ctx.backend.is_kernel_driver_active(
  File "c:\miniconda3\lib\site-packages\usb\backend\libusb1.py", line 915, in is_kernel_driver_active
    return bool(_check(self.lib.libusb_kernel_driver_active(dev_handle.handle,
  File "c:\miniconda3\lib\site-packages\usb\backend\libusb1.py", line 600, in _check
    raise NotImplementedError(_strerror(ret))
NotImplementedError: Operation not supported or unimplemented on this platform

libusb version is 1.0.24 (https://sourceforge.net/projects/libusb/files/libusb-1.0/libusb-1.0.24/libusb-1.0.24.7z/download)
I copied:
libusb-1.0.24\MinGW64\dll\libusb-1.0.dll -> Windows\System32
libusb-1.0.24\MinGW32\dll\libusb-1.0.dll -> Windows\SysWOW64

libusb-1.0.24\MinGW64\dll\libusb-1.0.lib -> Miniconda3\libs
libusb-1.0.24\MinGW64\dll\libusb-1.0.lib -> Miniconda3\Library\lib

python is 3.9.5 with the following packages:

Package                Version
---------------------- -------------------
brotlipy               0.7.0
certifi                2021.5.30
cffi                   1.14.6
chardet                4.0.0
click                  8.0.3
colorama               0.4.4
conda                  4.10.3
conda-package-handling 1.7.3
cryptography           3.4.7
idna                   2.10
importlib-metadata     4.9.0
importlib-resources    5.4.0
libusb                 1.0.24b1
menuinst               1.4.16
packaging              21.3
pip                    21.1.3
pkg-about              1.0.3
pycosat                0.6.3
pycparser              2.20
pyOpenSSL              20.0.1
pyparsing              3.0.6
PySocks                1.7.1
pyusb                  1.2.1
pywin32                228
requests               2.25.1
ruamel-yaml-conda      0.15.100
setuptools             52.0.0.post20210125
six                    1.16.0
tc420                  0.2.1
tqdm                   4.61.2
urllib3                1.26.6
wheel                  0.36.2
win-inet-pton          1.1.0
wincertstore           0.2
zipp                   3.6.0

Can you help me understand what to do to make this work?

Thank you!

@sasax
Copy link

sasax commented Jun 27, 2022

@cmd_group.resultcallback()

I had trouble with this method and this two @-commands. I removed the whole method and it worked on my raspberry pi with python3.9

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