Fix constants.TESSDATA_PREFIX to return tesserocr default if envvar not set
import os
+import tesserocr
NAMESPACES = {
'mets': "http://www.loc.gov/METS/",
@@ -32,7 +33,7 @@ TAG_PAGE_TEXTLINE = '{%s}TextLine' % NAMESPACES['page']
TAG_PAGE_TEXTEQUIV = '{%s}TextEquiv' % NAMESPACES['page']
TAG_PAGE_TEXTREGION = '{%s}TextRegion' % NAMESPACES['page']
-TESSDATA_PREFIX = os.environ['TESSDATA_PREFIX'] if 'TESSDATA_PREFIX' in os.environ else None
+TESSDATA_PREFIX = os.environ['TESSDATA_PREFIX'] if 'TESSDATA_PREFIX' in os.environ else tesserocr.get_languages()[0]
EXIF_COMPRESSION_METHODS = {
1: "Uncompressed",
