-
Notifications
You must be signed in to change notification settings - Fork 63
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
pywinusb with pyinstaller #45
Comments
Hello @tanyanghan , could you run your binary in an Administrator shell? I think the OS might be protecting the USB access to an un-trusted executable. If this works on a admin console, either you'd need to change the binary properties manually, or you might need to add some sort of trusted certificate (check pyinstaller docs). |
Hi @rene-aguirre, thanks for your response. I have tried running it as under an admin console, but it didn't make a difference. I also tried right clicking on the exe in Explorer and running the exe from Explorer as admin but it still didn't work. |
I've signed the exe with a self-signed certificate which I added to the Trusted Root Certification Authority on my PC, but the result is still the same with the vID and pID all returning as zeroes. The signing appears to have worked because the properties of the exe in Explorer now shows |
Further digging, BUT when it tries to read the attributes |
@tanyanghan Could be an issue with your registry? Example: http://digital.ni.com/public.nsf/allkb/1D52B53149DD637686256CAA00565E47 |
I tried it, and it didn't seem to have made a difference. |
Here's the problem. I was using Python x86-64 and it didn't work after pyinstaller packaged it up. It works with Python x86 (32-bit) after pyinstaller packages it up! |
Thanks for let us know @tanyanghan ! |
Hi there,
I'm trying to package up my python app that uses pywinusb with pyinstaller.
I wrote a little Test.py:
This works fine and I get a print out of a list of devices like:
When I then try to package it up using pyinstaller, it prints out
No devices found
.If I then add a debug print out line to
find_all_hid_devices()
incore.py
I get this from the pyinstaller version:
So it looks like it's finding the device paths, but somehow the vID and pID are zero. Any ideas on what could be missing from the pyinstaller package?
The text was updated successfully, but these errors were encountered: