From 244f5195dc97e6748a26467868925bc82f301592 Mon Sep 17 00:00:00 2001 From: gg Date: Mon, 27 May 2024 13:35:31 +0200 Subject: [PATCH] op sys fix --- src/components/brother_label_printer.py | 7 +++++-- src/requirements.txt | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/components/brother_label_printer.py b/src/components/brother_label_printer.py index 7d9b33a..3175298 100644 --- a/src/components/brother_label_printer.py +++ b/src/components/brother_label_printer.py @@ -1,7 +1,10 @@ import logging import os -import win32print -import win32ui +import platform + +if platform.system().lower() == "windows": + import win32print + import win32ui from PIL import Image, ImageDraw, ImageFont, ImageOps, ImageWin import qrcode diff --git a/src/requirements.txt b/src/requirements.txt index bab1fa4..22b9b08 100644 --- a/src/requirements.txt +++ b/src/requirements.txt @@ -15,9 +15,9 @@ pyqt5 pyqt5-tools pyserial pyserial-asyncio +qrcode requests tensorflow #tflite-runtime zebra pylibdmtx~=0.1.10 -qrcode \ No newline at end of file