The executable version can't load config for kha-white/manga-ocr-base" due to having system proxy
fireattack opened this issue · comments
I've replicated this by adding a directory kha-white/manga-ocr-base/
in my environment or app
folder.
Have you used MangaOcr
before as an independent package i.e. not within Cloe? Try deleting that installation and the kha-white/manga-ocr-base/
directory to see if it works
I don't have any folder called that, but I do have global system proxy on (via Internet Options).
I think it conflicts with that for some reason, since the error is gone after I turned off the proxy.
I've seen this problem with other compiled (packaged?) Python application (but no issue when run from source). I think it's caused by the packager missing some essential networking packages/modules when packaging it.
(I haven't tried running Cloe from source to confirm, maybe it won't run even from the source.)
BTW, Poricom has no such problem.
Just tried to run it from source, and it works flawlessly with Python 3.9 with system proxy ON.
By the way I think you probably would like to know: when I initially tried it with Py3.8, it didn't work due to unsupported type hinting syntax (such as
def __init__(self, hotkeys: dict[str, tuple[QObject, str]], *args, **kwargs):
which causes
Exception has occurred: TypeError
'type' object is not subscriptable
) Not a big deal, but probably should remove 3.8 support from readme and [tool.poetry.dependencies]
.
Probably not related at all, but I also have system proxy issues with PIP in Py3.8 too (not in 3.9):
C:\files\Cloe>py -3.9 -m pip install requests -U
Requirement already satisfied: requests in c:\users\ikena\appdata\local\programs\python\python39\lib\site-packages (2.30.0)
Requirement already satisfied: certifi>=2017.4.17 in c:\users\ikena\appdata\local\programs\python\python39\lib\site-packages (from requests) (2023.5.7)
Requirement already satisfied: urllib3<3,>=1.21.1 in c:\users\ikena\appdata\local\programs\python\python39\lib\site-packages (from requests) (2.0.2)
Requirement already satisfied: idna<4,>=2.5 in c:\users\ikena\appdata\local\programs\python\python39\lib\site-packages (from requests) (3.4)
Requirement already satisfied: charset-normalizer<4,>=2 in c:\users\ikena\appdata\local\programs\python\python39\lib\site-packages (from requests) (3.1.0)
WARNING: You are using pip version 22.0.4; however, version 23.1.2 is available.
You should consider upgrading via the 'C:\Users\ikena\AppData\Local\Programs\Python\Python39\python.exe -m pip install --upgrade pip' command.
C:\files\Cloe>py -3.8 -m pip install requests -U
Requirement already satisfied: requests in c:\users\ikena\appdata\local\programs\python\python38\lib\site-packages (2.30.0)
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1131)'))': /simple/requests/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1131)'))': /simple/requests/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1131)'))': /simple/requests/
ERROR: Operation cancelled by user
Sorry for the multiple replies.
I also tried to build it myself using pyinstaller following the instruction in readme,.
The building process is successful but it looks like it's missing lots of files in ./build/dist/app
compared to the one in release
, particularly no DLLs of qt:
Unsparingly it didn't boot:
Traceback (most recent call last):
File "main.py", line 25, in <module>
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
File "PyInstaller\loader\pyimod02_importers.py", line 499, in exec_module
File "components\windows\__init__.py", line 20, in <module>
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
File "PyInstaller\loader\pyimod02_importers.py", line 499, in exec_module
File "components\windows\tray.py", line 20, in <module>
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
File "PyInstaller\loader\pyimod02_importers.py", line 499, in exec_module
File "manga_ocr\__init__.py", line 3, in <module>
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
File "PyInstaller\loader\pyimod02_importers.py", line 499, in exec_module
File "manga_ocr\ocr.py", line 8, in <module>
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
File "PyInstaller\loader\pyimod02_importers.py", line 499, in exec_module
File "transformers\__init__.py", line 30, in <module>
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
File "PyInstaller\loader\pyimod02_importers.py", line 499, in exec_module
File "transformers\dependency_versions_check.py", line 17, in <module>
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
File "PyInstaller\loader\pyimod02_importers.py", line 499, in exec_module
File "transformers\utils\__init__.py", line 33, in <module>
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
File "PyInstaller\loader\pyimod02_importers.py", line 499, in exec_module
File "transformers\utils\generic.py", line 28, in <module>
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
File "PyInstaller\loader\pyimod02_importers.py", line 499, in exec_module
File "transformers\utils\import_utils.py", line 36, in <module>
File "transformers\utils\logging.py", line 123, in get_logger
File "transformers\utils\logging.py", line 86, in _configure_library_root_logger
AttributeError: 'NoneType' object has no attribute 'flush'
I don't know anything about pyinstaller so I just leave it here. This isn't too related to the original problem (also modified the title to reflect it).
By the way I think you probably would like to know: when I initially tried it with Py3.8, it didn't work due to unsupported type hinting syntax
I should probably update the poetry config
As for the build error, this is not related to using a proxy, see #22 for more info. Unfortunately, I still haven't found a real fix to it other than downgrading some of the packages.