Discussion:
[pyusb-users] question
Jay Newens
2015-06-11 19:44:07 UTC
Permalink
I am using pyusb in my Python 2.7 environment getting the status of the
Zebra KR403 printer and having good success on a Windows 7 64 bit PC. Now I
am ready to test this on my target machine. I have created my executable
program with py2exe and tested the exe on my development PC and it works
fine but when I move it to my target PC I get a message "No Backend
Available" when it gets to the "dev = usb.core.find(idVendor=int(VID),
idProduct=int(PID))" part of my code. I convert the hex to an integer here
but when using the hex value I get the same issue on my target PC, even with
hex value, both hex and converting to integer work fine on the development
PC so I do not think the issue is here.



Traceback (most recent call last):

File "ZebraKR403PaperStatus1.0.py", line 98, in <module>

File "usb\core.pyc", line 846, in find

ValueError: No backend available



I am not sure what is causing the issue. It seems as though there is a
missing dll or something that is required to make this work and it did not
make it to my target PC. Any suggestions or ideas what I may be missing
would be greatly appreciated.





Jay
Wander Lairson Costa
2015-06-12 01:31:13 UTC
Permalink
Post by Jay Newens
I am using pyusb in my Python 2.7 environment getting the status of the
Zebra KR403 printer and having good success on a Windows 7 64 bit PC. Now I
am ready to test this on my target machine. I have created my executable
program with py2exe and tested the exe on my development PC and it works
fine but when I move it to my target PC I get a message “No Backend
Available” when it gets to the “dev = usb.core.find(idVendor=int(VID),
idProduct=int(PID))” part of my code. I convert the hex to an integer here
but when using the hex value I get the same issue on my target PC, even with
hex value, both hex and converting to integer work fine on the development
PC so I do not think the issue is here.
PyUSB on Windows depends either of libusb 1.0 or libusb-win32.
Contrary to the unices version, libusb on Windows needs to attach as a
device driver. You can use zadig to install libusb (or libusb-win32)
driver for your device. libusb uses the WinUSB driver (which is
shipped with Windows). If you want to redistribute your software to
users, you will have to provide a driver package to the user
(basically writing an inf file and ship the binaries). However, giving
details on how to do that is out of scope of this mailing list. OSR
[1] can be helpful here

[1] http://www.osronline.com/
Post by Jay Newens
File "ZebraKR403PaperStatus1.0.py", line 98, in <module>
File "usb\core.pyc", line 846, in find
ValueError: No backend available
I am not sure what is causing the issue. It seems as though there is a
missing dll or something that is required to make this work and it did not
make it to my target PC. Any suggestions or ideas what I may be missing
would be greatly appreciated.
Jay
------------------------------------------------------------------------------
_______________________________________________
pyusb-users mailing list
https://lists.sourceforge.net/lists/listinfo/pyusb-users
--
Best Regards,
Wander Lairson Costa

------------------------------------------------------------------------------
Jay Newens
2015-06-12 14:40:34 UTC
Permalink
I have the LibUSB-Win32 installed and the test program is connected to my Zebra KR403 printer and I can see the configuration info for the printer so I think my driver package is ok. I am curious though about the libusb0.dll. I see that it is installed in C:\Windows\System32\Config\ and I do not think my program is looking for it there. I put a copy of the dll file in the root of System32 and my program now works on my target PC.








-----Original Message-----
From: Wander Lairson Costa [mailto:***@gmail.com]
Sent: Thursday, June 11, 2015 20:31
To: pyusb-users
Subject: Re: [pyusb-users] question
Post by Jay Newens
I am using pyusb in my Python 2.7 environment getting the status of
the Zebra KR403 printer and having good success on a Windows 7 64 bit
PC. Now I am ready to test this on my target machine. I have created
my executable program with py2exe and tested the exe on my development
PC and it works fine but when I move it to my target PC I get a
message “No Backend Available” when it gets to the “dev =
usb.core.find(idVendor=int(VID), idProduct=int(PID))” part of my code.
I convert the hex to an integer here but when using the hex value I
get the same issue on my target PC, even with hex value, both hex and
converting to integer work fine on the development PC so I do not think the issue is here.
PyUSB on Windows depends either of libusb 1.0 or libusb-win32.
Contrary to the unices version, libusb on Windows needs to attach as a device driver. You can use zadig to install libusb (or libusb-win32) driver for your device. libusb uses the WinUSB driver (which is shipped with Windows). If you want to redistribute your software to users, you will have to provide a driver package to the user (basically writing an inf file and ship the binaries). However, giving details on how to do that is out of scope of this mailing list. OSR [1] can be helpful here

[1] http://www.osronline.com/
Post by Jay Newens
File "ZebraKR403PaperStatus1.0.py", line 98, in <module>
File "usb\core.pyc", line 846, in find
ValueError: No backend available
I am not sure what is causing the issue. It seems as though there is a
missing dll or something that is required to make this work and it did
not make it to my target PC. Any suggestions or ideas what I may be
missing would be greatly appreciated.
Jay
----------------------------------------------------------------------
--------
_______________________________________________
pyusb-users mailing list
https://lists.sourceforge.net/lists/listinfo/pyusb-users
--
Best Regards,
Wander Lairson Costa
Xiaofan Chen
2015-06-15 03:36:45 UTC
Permalink
Post by Jay Newens
I have the LibUSB-Win32 installed and the test program is
connected to my Zebra KR403 printer and I can see the
configuration info for the printer so I think my driver package
is ok. I am curious though about the libusb0.dll. I see that it
is installed in C:\Windows\System32\Config\ and I do not think
my program is looking for it there. I put a copy of the dll file in
the root of System32 and my program now works on my target PC.
Then your driver installation is not correct. You should use
Zadig to install libusb-win32 driver (or WinUSB driver).
http://zadig.akeo.ie/
--
Xiaofan

------------------------------------------------------------------------------
Jay Newens
2015-06-19 01:54:37 UTC
Permalink
Ok,

I have a new problem. I am using libusb-win32-bin-1.2.6.0. I am using the
libusb0.dll and libusb0.sys. I am communicating to a ZebraKR403 printer
checking for the status. On my dev PC this is working and I have packaged my
program with py2exe and installed it on my first target PC along with the
libusb-win32-bin-1.2.6.0 and it is working fine. On my second PC I am
getting an error when the program runs.

Traceback (most recent call last):
File "ZebraKR403PaperStatus1.0.py", line 1, in <module>
File "usb\__init__.pyc", line 97, in <module>
File "usb\legacy.pyc", line 29, in <module>
File "usb\core.pyc", line 50, in <module>
ImportError: No module named _objfinalizer


The only difference between the PC's is the windows OS, both Windows 7, one
64 bit and the one not working is 32 bit. The exe package was created on a
32 bit machine with py2exe. Any idea?

Jay






------------------------------------------------------------------------------
Xiaofan Chen
2015-06-21 02:12:37 UTC
Permalink
Post by Jay Newens
Ok,
I have a new problem. I am using libusb-win32-bin-1.2.6.0. I am using the
libusb0.dll and libusb0.sys. I am communicating to a ZebraKR403 printer
checking for the status. On my dev PC this is working and I have packaged my
program with py2exe and installed it on my first target PC along with the
libusb-win32-bin-1.2.6.0 and it is working fine. On my second PC I am
getting an error when the program runs.
File "ZebraKR403PaperStatus1.0.py", line 1, in <module>
File "usb\__init__.pyc", line 97, in <module>
File "usb\legacy.pyc", line 29, in <module>
File "usb\core.pyc", line 50, in <module>
ImportError: No module named _objfinalizer
The only difference between the PC's is the windows OS, both Windows 7, one
64 bit and the one not working is 32 bit. The exe package was created on a
32 bit machine with py2exe. Any idea?
Did you install the driver on the 2nd PC?
--
Xiaofan

------------------------------------------------------------------------------
Jay Newens
2015-06-23 18:59:42 UTC
Permalink
Yes the driver is installed on the second PC.




Jay Newens| Product Manager
4023 W. University |  Bldg B | McKinney, TX 75071
972-347-1766 | www.nemo-q.com

The world is waiting....




-----Original Message-----
From: Xiaofan Chen [mailto:***@gmail.com]
Sent: Saturday, June 20, 2015 21:13
To: pyusb-***@lists.sourceforge.net
Subject: Re: [pyusb-users] question
Post by Jay Newens
Ok,
I have a new problem. I am using libusb-win32-bin-1.2.6.0. I am using
the libusb0.dll and libusb0.sys. I am communicating to a ZebraKR403
printer checking for the status. On my dev PC this is working and I
have packaged my program with py2exe and installed it on my first
target PC along with the
libusb-win32-bin-1.2.6.0 and it is working fine. On my second PC I am
getting an error when the program runs.
File "ZebraKR403PaperStatus1.0.py", line 1, in <module>
File "usb\__init__.pyc", line 97, in <module>
File "usb\legacy.pyc", line 29, in <module>
File "usb\core.pyc", line 50, in <module>
ImportError: No module named _objfinalizer
The only difference between the PC's is the windows OS, both Windows 7, one
64 bit and the one not working is 32 bit. The exe package was created on a
32 bit machine with py2exe. Any idea?
Did you install the driver on the 2nd PC?


--
Xiaofan

----------------------------------------------------------------------------
--
_______________________________________________
pyusb-users mailing list
pyusb-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users

Continue reading on narkive:
Loading...