-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
【系统路径缺失】无法完成初始化,PaddleOCR-json.exe报错chcp不是内部或外部命令 #9
Comments
请问以前使用是正常的吗?如果是,可能配置文件被修改过,而且参数不正确。尝试下载最新版软件,看看可否运行。 如果依然不行,尝试打开 |
作者大大您好 我在下载了1.2.6版本后也出现了初始化失败的问题 |
可否将1.2.6初始化失败的弹窗截图放上来?我想看看它的信息 |
意料之外的问题。你电脑打开cmd,输入
OK,以后会加入超时监控以防止程序因未知原因卡死 |
嗯 可以了 谢谢作者大大,我将C:\Windows\system32 加入系统路径 后 可以进行识别了 |
@hiroi-sora |
@andongya95 import os
import subprocess # 进程,管道
# exePath = r"填入PaddleOCR_json.exe的路径"
exePath = r"D:\MyCode\PythonCode\Umi-OCR\PaddleOCR-json\PaddleOCR_json.exe"
cwd = os.path.abspath(os.path.join(exePath, os.pardir))
print(exePath, cwd)
popen = subprocess.Popen( # 打开管道
exePath, cwd=cwd,
stdin=subprocess.PIPE,
stdout=subprocess.PIPE,
)
for i in range(1000):
if not popen.poll() == None: # 子进程已退出,初始化失败
print('子进程已退出,初始化失败!')
break
initStr = popen.stdout.readline().decode('ascii', errors='ignore')
print(f'{i} : {initStr}')
if 'OCR init completed.' in initStr:
print(f'初始化成功!')
break
if i >= 999:
print(f'输出条数异常,初始化失败!')
if popen.poll():
popen.kill() |
@hiroi-sora 更新: |
那既然这段demo能跑,Umi-OCR理应没问题呀 试试直接调用 callingOCR.py ,在最后加入一行 ocr = CallingOCR('填入PaddleOCR_json.exe的路径') 把第46行的 看能不能初始化成功 |
|
您好 今天使用卡初始化了 不知道什么原因
The text was updated successfully, but these errors were encountered: