i configured my pytesstract path for additional traineddata like below
PATH = r"/home/wiltomalayalamocr/mysite/langfiles"
custom_oem_psm_config = '-l {} --psm {} --tessdata-dir {}'.format(lang,6,PATH)
text = pytesseract.image_to_string(Image.open(filename) , config=custom_oem_psm_config)
my " langfiles" folder contains "mal.traineddata" file. but it always looking its default location and raise the error
pytesseract.pytesseract.TesseractError: (1, 'Tesseract Open Source OCR Engine v3.04.01 with Leptonica Error opening data file /usr/share/tesseract-ocr/tessdata/mal.traineddata Please make sure the TESSDATA_PREFIX environment variable is set to the parent directory of your "tessdata" directory. Failed loading language \'mal\' Tesseract couldn\'t load any languages! Could not initialize tesseract.')
Please help.....