def createUser(self, content): try: user = User(content["name"], content["email"], DB.encrypt(content["pin"])) except KeyError as e: raise BadRequest("I/O error: {0} was not included".format(e)) try: user.clockwidget(content["clockwidget"]) except KeyError as e: print("I/O error: {0} was not included".format(e)) try: user.twitterwidget(content["twittertoken"]) except KeyError as e: print("I/O error: {0} was not included".format(e)) try: user.calendarwidget(content["calendarwidget"]) except KeyError as e: print("I/O error: {0} was not included".format(e)) try: user.mapswidget(content["mapswidget"]) except KeyError as e: print("I/O error: {0} was not included".format(e)) try: user.weatherwidget(content["weatherwidget"]) except KeyError as e: print("I/O error: {0} was not included".format(e)) return user