Skip to content
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

运行UMI-OCR.exe后, 无任何显示 #33

Closed
phyzjqkl opened this issue Oct 24, 2023 · 9 comments
Closed

运行UMI-OCR.exe后, 无任何显示 #33

phyzjqkl opened this issue Oct 24, 2023 · 9 comments

Comments

@phyzjqkl
Copy link

phyzjqkl commented Oct 24, 2023

系统win11 i5-1135G7, 但可以看到进程。 系统已装python 3.9. 但系统可以看到进程

image

@hiroi-sora
Copy link
Owner

跟系统python没有关系的。

试下运行 UmiOCR-data/test_run.bat 强制启动程序,看看能不能启动

@phyzjqkl
Copy link
Author

在file explore里双击不行。 在CMD运行就可以了。 谢谢

@hiroi-sora
Copy link
Owner

如果正常从exe双击启动,Umi在系统托盘区的图标能加载出来吗?

@minakami-akihiro
Copy link

我这边双击exe没有任何反应,在任务栏没有图标也没有进程。但test_run或者用命令行启动exe也可以打开。

@hiroi-sora
Copy link
Owner

之后的版本中 ,如果 Umi-OCR.exe 失效,可以用备用启动器:

UmiOCR-data/RUN_GUI.bat

它以最大兼容性启动软件,且不显示控制台窗口。

@GFDGIT
Copy link

GFDGIT commented Oct 26, 2023

你好开发者,

我运行预览版 dev 20231025Umi-OCR.exeRUN_GUI.bat,均没有任何反应。
在CMD中运行Umi-OCR.exe,报错如下:

D:\Software\Umi-OCR>Umi-OCR.exe

D:\Software\Umi-OCR>Traceback (most recent call last):
  File "D:\Software\Umi-OCR\UmiOCR-data\site-packages\pyzbar\zbar_library.py", line 58, in load
    dependencies, libzbar = load_objects(Path(''))
  File "D:\Software\Umi-OCR\UmiOCR-data\site-packages\pyzbar\zbar_library.py", line 50, in load_objects
    deps = [
  File "D:\Software\Umi-OCR\UmiOCR-data\site-packages\pyzbar\zbar_library.py", line 51, in <listcomp>
    cdll.LoadLibrary(str(directory.joinpath(dep)))
  File "ctypes\__init__.py", line 451, in LoadLibrary
  File "ctypes\__init__.py", line 373, in __init__
FileNotFoundError: Could not find module 'libiconv.dll' (or one of its dependencies). Try using the full path with constructor syntax.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "D:\Software\Umi-OCR\UmiOCR-data\main.py", line 60, in <module>
    runScript()  # 启动脚本
  File "D:\Software\Umi-OCR\UmiOCR-data\main.py", line 55, in runScript
    main()
  File "D:\Software\Umi-OCR\UmiOCR-data\py_src\run.py", line 109, in main
    res = runQml()  # 启动qml
  File "D:\Software\Umi-OCR\UmiOCR-data\py_src\run.py", line 25, in runQml
    from .tag_pages.tag_pages_connector import TagPageConnector  # 页面连接器
  File "C:\Users\RD-01\AppData\Local\Temp\embedded.5c2jaiha.zip\shibokensupport\__feature__.py", line 142, in _import
  File "D:\Software\Umi-OCR\UmiOCR-data\py_src\tag_pages\tag_pages_connector.py", line 15, in <module>
    from .QRcode import QRcode
  File "C:\Users\RD-01\AppData\Local\Temp\embedded.5c2jaiha.zip\shibokensupport\__feature__.py", line 142, in _import
  File "D:\Software\Umi-OCR\UmiOCR-data\py_src\tag_pages\QRcode.py", line 12, in <module>
    import pyzbar.pyzbar as pyzbar
  File "C:\Users\RD-01\AppData\Local\Temp\embedded.5c2jaiha.zip\shibokensupport\__feature__.py", line 142, in _import
  File "D:\Software\Umi-OCR\UmiOCR-data\site-packages\pyzbar\pyzbar.py", line 7, in <module>
    from .wrapper import (
  File "C:\Users\RD-01\AppData\Local\Temp\embedded.5c2jaiha.zip\shibokensupport\__feature__.py", line 142, in _import
  File "D:\Software\Umi-OCR\UmiOCR-data\site-packages\pyzbar\wrapper.py", line 151, in <module>
    zbar_version = zbar_function(
  File "D:\Software\Umi-OCR\UmiOCR-data\site-packages\pyzbar\wrapper.py", line 148, in zbar_function
    return prototype((fname, load_libzbar()))
  File "D:\Software\Umi-OCR\UmiOCR-data\site-packages\pyzbar\wrapper.py", line 127, in load_libzbar
    libzbar, dependencies = zbar_library.load()
  File "D:\Software\Umi-OCR\UmiOCR-data\site-packages\pyzbar\zbar_library.py", line 60, in load
    dependencies, libzbar = load_objects(Path(__file__).parent)
  File "D:\Software\Umi-OCR\UmiOCR-data\site-packages\pyzbar\zbar_library.py", line 54, in load_objects
    libzbar = cdll.LoadLibrary(str(directory.joinpath(fname)))
  File "ctypes\__init__.py", line 451, in LoadLibrary
  File "ctypes\__init__.py", line 373, in __init__
FileNotFoundError: Could not find module 'D:\Software\Umi-OCR\UmiOCR-data\site-packages\pyzbar\libzbar-64.dll' (or one of its dependencies). Try using the full path with constructor syntax.

此外,预览版 dev 20231010可以正常使用。
麻烦你看一下,谢谢!

@hiroi-sora
Copy link
Owner

@GFDGIT

感谢提供报错信息。你这个问题与楼上不同,你这是由二维码解码库 pyzbar 不兼容而引起的。所以无论Umi-OCR.exe还是RUN_GUI.bat都会出现同样的问题。

旧版本(20231018及以前)没有二维码功能,所以不会出现此问题。

关于二维码库兼容性的问题,我会继续调查。

@hiroi-sora
Copy link
Owner

hiroi-sora commented Oct 26, 2023

@GFDGIT

主要的问题出在这里。

FileNotFoundError: Could not find module 'libiconv.dll' (or one of its dependencies). Try using the full path with constructor syntax.

根据网上的一些资料:

https://stackoverflow.com/questions/66792366/could-not-find-module-libiconv-dll-when-trying-to-import-pyzbar-module-into
https://stackoverflow.com/questions/64570443/q-how-to-fix-the-missing-dependancies-in-pyzbar
https://www.cnblogs.com/GengMingYan/p/15418569.html
https://blog.csdn.net/cyz141001/article/details/121714978
https://blog.csdn.net/AlanGuoo/article/details/83782958

image

该问题不是个例,主要是由于系统缺失一些动态库所引起的。请尝试下载安装VC库,看看能否解决问题:

https://download.microsoft.com/download/F/3/5/F3500770-8A08-488E-94B6-17A1E1DD526F/vcredist_x64.exe

后续我会让Umi-OCR在加载该库时进行检查,或者干脆内置必须的动态库文件。

@GFDGIT
Copy link

GFDGIT commented Oct 26, 2023

@hiroi-sora
安装vc++2013 x64,可以正常运行了,感谢!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants