Prevent fatal exit cuased by missing imports #8

Closed
Hesham wants to merge 1 commits from fix-imports into master

17
main.py
View File

@ -1,21 +1,20 @@
from time import sleep from time import sleep
from PIL import Image
import os
import serial
import sys import sys
import os
import json import json
import datetime import datetime
try: try:
import numpy as np import numpy as np
from picamera import PiCamera from picamera import PiCamera
from picamera.array import PiRGBArray from picamera.array import PiRGBArray
import cv2 import serial
import cv2
except Exception as ex: except Exception as ex:
print('[ Error ] some depandincies are missing\n'+ str(ex.args)) print('[ Error ] some depandincies are missing\n'+ str(ex.args))
sys.exit() sys.exit()
def init(): def init():
go = True go = True