我目前正在使用USB条形码扫描仪制作条形码扫描仪应用程序,并且目前正在遵循指南here
我尝试在'sudo'中运行它并修复了权限,但不知何故它不起作用。
代码是我从here获得的。只是测试它如何获取输入。
Traceback (most recent call last):
File "main.py", line 96, in <module>
UPC_lookup(api_key,barcode_reader())
File "main.py", line 23, in barcode_reader
fp = os.open('/dev/hidraw0', os.O_RDWR|os.O_NONBLOCK)
OSError: [Errno 2] No such file or directory: '/dev/hidraw0'