Spaces:
Sleeping
Sleeping
Yaz Hobooti
commited on
Commit
·
191c79a
1
Parent(s):
bd3b9d5
Fix HAS_ZXING NameError: check if variable exists before using
Browse files
app.py
CHANGED
|
@@ -61,7 +61,7 @@ except Exception as e:
|
|
| 61 |
print(f"✗ Barcode reader import failed: {e}")
|
| 62 |
|
| 63 |
# Enable barcode detection if we have ZXing-CPP or pyzbar
|
| 64 |
-
if HAS_ZXING:
|
| 65 |
HAS_BARCODE = True
|
| 66 |
print("✓ Barcode detection enabled via ZXing-CPP")
|
| 67 |
elif HAS_BARCODE:
|
|
|
|
| 61 |
print(f"✗ Barcode reader import failed: {e}")
|
| 62 |
|
| 63 |
# Enable barcode detection if we have ZXing-CPP or pyzbar
|
| 64 |
+
if 'HAS_ZXING' in globals() and HAS_ZXING:
|
| 65 |
HAS_BARCODE = True
|
| 66 |
print("✓ Barcode detection enabled via ZXing-CPP")
|
| 67 |
elif HAS_BARCODE:
|