From 0b681b489996ea8b9a9a5d3fc670af841994085d Mon Sep 17 00:00:00 2001 From: schneefux Date: Thu, 25 Sep 2014 17:44:29 +0200 Subject: Add error handler for cmuclmtk import to vocabcompiler --- client/vocabcompiler.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'client') diff --git a/client/vocabcompiler.py b/client/vocabcompiler.py index a7d2c4b..9481ef6 100644 --- a/client/vocabcompiler.py +++ b/client/vocabcompiler.py @@ -10,9 +10,12 @@ import logging import hashlib from abc import ABCMeta, abstractmethod, abstractproperty -import cmuclmtk import g2p import brain +try: + import cmuclmtk +except: + logging.getLogger(__name__).error("Error importing CMUCLMTK module. PocketsphinxVocabulary will not work correctly.", exc_info=True) class AbstractVocabulary(object): -- cgit v1.3.1