aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--FereFit_syncTime_BLE.py (renamed from FereFit_BLE_test.py)9
1 files changed, 8 insertions, 1 deletions
diff --git a/FereFit_BLE_test.py b/FereFit_syncTime_BLE.py
index 59efac0..0076127 100644
--- a/FereFit_BLE_test.py
+++ b/FereFit_syncTime_BLE.py
@@ -1,5 +1,12 @@
import asyncio
-from bleak import BleakScanner, BleakClient
+import sys
+try:
+ from bleak import BleakScanner, BleakClient
+except ModuleNotFoundError:
+ print("Error importing bleak, are you sure you installed it?")
+ print("Try running the following command: \"pip3 install bleak\"")
+ print("If that fails, try this: \"pip3 install bleak --break-system-packages\"")
+ sys.exit(1)
import time, calendar
async def sync(device_name: str):