我试图与爱普生POS TM-82打印机在windows 7 (64位)。我安装了打印机的驱动程序。我安装了python 2.7.15 (64位)。为了使用python,我使用了这个包python-代记。
在安装python并尝试以记录在案的形式运行之后,我将得到一个错误:
from escpos.printer import Usb
Usb(0x04b8, 0x0e11)usb.core.NoBackendError:没有后端可用
libusb-1.0.20_2\MS64\dll\libusb-1.0.lib复制到我的C:\Windows\System32中。最后将libusb-1.0.20_2\MS64\static\libusb-1.0.lib复制到C:\Python27\libs\
之后,我从上面运行了相同的python文档命令,这一次我得到了一个不同的错误:
NotImplementedError:在此平台上不支持或未实现的操作我在这里错过了什么?你能帮帮我吗。谢谢。
发布于 2018-11-21 05:20:44
在这里回答我自己的问题。所以,问题在于库。我必须从printer.py (该库的python模块)中删除以下内容:
try:
check_driver = self.device.is_kernel_driver_active(0)
except NotImplementedError:
pass
if check_driver is None or check_driver:
try:
self.device.detach_kernel_driver(0)
except usb.core.USBError as e:
if check_driver is not None:
print("Could not detatch kernel driver: {0}".format(str(e)))详细信息可以在我的5~6成熟博客上找到。
https://stackoverflow.com/questions/53261467
复制相似问题