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

Windows OnlyKeyUnavailableException #4

Closed
fayep opened this issue Dec 1, 2016 · 4 comments
Closed

Windows OnlyKeyUnavailableException #4

fayep opened this issue Dec 1, 2016 · 4 comments

Comments

@fayep
Copy link

fayep commented Dec 1, 2016

I have the key plugged in, the pin is entered, I installed python2.7 and the vcpython package then I checked the docs for hid, built the DLL and copied it to python27/DLLs, what is missing for me to be able to access the key?

hid.enumerate() includes:

{'usage_page': 1, 'product_id': 1158, 'interface_number': 1, 'manufacturer_string': u'Teensyduino', 'vendor_id': 5824, 'release_number': 256, 'serial_number': u'4294967295', 'usage': 6, 'path': '\\\\?\\hid#vid_16c0&pid_0486&mi_01#7&e0f5669&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}', 'product_string': u'Keyboard/RawHID'}, {'usage_page': 61904, 'product_id': 1158, 'interface_number': 0, 'manufacturer_string': u'Teensyduino', 'vendor_id': 5824, 'release_number': 256, 'serial_number': u'4294967295', 'usage': 1, 'path': '\\\\?\\hid#vid_16c0&pid_0486&mi_00#7&213f72a7&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}', 'product_string': u'Keyboard/RawHID'}

Which I believe is the required device, but I still get:

C:\Users\faye\Downloads\hidapi-0.7.0\hidapi-0.7.0\windows>onlykey-cli
No handlers could be found for logger "onlykey.client"
Traceback (most recent call last):
  File "C:\Python27\Scripts\onlykey-cli-script.py", line 9, in <module>
    load_entry_point('onlykey==0.0.1', 'console_scripts', 'onlykey-cli')()
  File "c:\python27\lib\site-packages\pkg_resources\__init__.py", line 542, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "c:\python27\lib\site-packages\pkg_resources\__init__.py", line 2569, in load_entry_point
    return ep.load()
  File "c:\python27\lib\site-packages\pkg_resources\__init__.py", line 2229, in load
    return self.resolve()
  File "c:\python27\lib\site-packages\pkg_resources\__init__.py", line 2235, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "c:\python27\lib\site-packages\onlykey\cli.py", line 20, in <module>
    only_key = OnlyKey()
  File "c:\python27\lib\site-packages\onlykey\client.py", line 98, in __init__
    raise e
onlykey.client.OnlyKeyUnavailableException
@fayep
Copy link
Author

fayep commented Dec 3, 2016

I switched to python3, but now I get ImportError No module named 'client':

C:\Users\faye>onlykey-cli
Traceback (most recent call last):
  File "C:\Users\faye\AppData\Local\Programs\Python\Python35\Scripts\onlykey-cli-script.py", line 9, in <module>
    load_entry_point('onlykey==0.0.1', 'console_scripts', 'onlykey-cli')()
  File "c:\users\faye\appdata\local\programs\python\python35\lib\site-packages\pkg_resources\__init__.py", line 542, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "c:\users\faye\appdata\local\programs\python\python35\lib\site-packages\pkg_resources\__init__.py", line 2569, in load_entry_point
    return ep.load()
  File "c:\users\faye\appdata\local\programs\python\python35\lib\site-packages\pkg_resources\__init__.py", line 2229, in load
    return self.resolve()
  File "c:\users\faye\appdata\local\programs\python\python35\lib\site-packages\pkg_resources\__init__.py", line 2235, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "c:\users\faye\appdata\local\programs\python\python35\lib\site-packages\onlykey\__init__.py", line 2, in <module>
    from client import OnlyKey, Message, MessageField  # Make `OnlyKey` available
ImportError: No module named 'client'

@fayep
Copy link
Author

fayep commented Dec 6, 2016

signal11/hidapi#231 seems to be the problem and lists a workaround. I will give it a try if I get the chance.

@onlykey
Copy link
Contributor

onlykey commented Dec 22, 2016

@fayep I have had similar issues when trying to run the chrome app at the same time as the command line tool. Make sure to use one at a time. I have verified this tool is working on Mac OS El Capitan.

Also some major revisions were just made to this tool so there may be some bugs to work out.

@onlykey
Copy link
Contributor

onlykey commented Jul 6, 2017

@fayep With the recent changes to python-onlykey Windows now works if you want to give it another shot.

@onlykey onlykey closed this as completed Nov 20, 2017
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