Skyexu/TopSup

2个错误,麻烦帮我看下

michiko5173 opened this issue · 1 comments

一个是orc.py的
Traceback (most recent call last):
File "C:/Users/michiko/SynologyDrive/py/TopSup-master/TopSup-master/common/ocr.py", line 220, in
question, choices = ocr_img_baidu(image)
TypeError: ocr_img_baidu() missing 1 required positional argument: 'config'
一个是GetQuestionAndroid.py的
Traceback (most recent call last):
File "C:/Users/michiko/SynologyDrive/py/TopSup-master/TopSup-master/GetQuestionAndroid.py", line 36, in
question, choices = ocr.ocr_img_tess(img, config)
File "C:\Users\michiko\SynologyDrive\py\TopSup-master\TopSup-master\common\ocr.py", line 138, in ocr_img_tess
region_text = pytesseract.image_to_string(region_im, lang='chi_sim', config=tessdata_dir_config)
File "C:\Users\michiko\PycharmProjects\untitled3\venv\lib\site-packages\pytesseract\pytesseract.py", line 193, in image_to_string
return run_and_get_output(image, 'txt', lang, config, nice)
File "C:\Users\michiko\PycharmProjects\untitled3\venv\lib\site-packages\pytesseract\pytesseract.py", line 140, in run_and_get_output
run_tesseract(**kwargs)
File "C:\Users\michiko\PycharmProjects\untitled3\venv\lib\site-packages\pytesseract\pytesseract.py", line 116, in run_tesseract
raise TesseractError(status_code, get_errors(error_string))
pytesseract.pytesseract.TesseractError: (1, 'Error opening data file C:\Program Files (x86)\Tesseract-OCR\tessdata/chi_sim.traineddata Please make sure the TESSDATA_PREFIX environment variable is set to the parent directory of your "tessdata" directory. Failed loading language 'chi_sim' Tesseract couldn't load any languages! Could not initialize tesseract.')

https://github.com/tesseract-ocr/tessdata/raw/4.00/chi_sim.traineddata
去下载这个,放到你的tessdata目录下