CnOCR icon indicating copy to clipboard operation
CnOCR copied to clipboard

读取的文件名似乎不支持中文

Open 5m1le71ger opened this issue 1 year ago • 1 comments

代码如下: from cnocr import CnOcr print('begin') img_fp = './img/战斗-进入游戏.png' ocr = CnOcr() # 所有参数都使用默认值 print('ocr') #out = ocr.ocr(img_fp) out = ocr.ocr_for_single_line(img_fp) print(out)

结果: Exception has occurred: FileNotFoundError Error loading image: ./img/战斗-进入游戏.png File "E:\mywork\国王指意\cnocrtest.py", line 8, in out = ocr.ocr_for_single_line(img_fp) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ FileNotFoundError: Error loading image: ./img/战斗-进入游戏.png

换成英文文件名就可以

5m1le71ger avatar Dec 10 '23 09:12 5m1le71ger

用英文

freeok avatar Dec 14 '23 19:12 freeok