From 5fe424abae515f4f70941408583049d570ff8098 Mon Sep 17 00:00:00 2001 From: lededev Date: Wed, 20 Apr 2022 22:20:11 +0800 Subject: [PATCH] fix issue #769 No Module named 'ImageProcessing.cnn' --- .github/workflows/main.yml | 4 ++-- Makefile | 2 ++ py_to_exe.ps1 | 2 +- wrapper/FreeBSD.sh | 2 ++ wrapper/Linux.sh | 2 ++ 5 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 34c2c61..2c4fde1 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -39,7 +39,7 @@ jobs: run: | pyinstaller \ --onefile Movie_Data_Capture.py \ - --hidden-import "ImageProcessing.hog" \ + --hidden-import "ImageProcessing.cnn" \ --add-data "$(python -c 'import cloudscraper as _; print(_.__path__[0])' | tail -n 1):cloudscraper" \ --add-data "$(python -c 'import opencc as _; print(_.__path__[0])' | tail -n 1):opencc" \ --add-data "$(python -c 'import face_recognition_models as _; print(_.__path__[0])' | tail -n 1):face_recognition_models" \ @@ -51,7 +51,7 @@ jobs: run: | pyinstaller ` --onefile Movie_Data_Capture.py ` - --hidden-import "ImageProcessing.hog" ` + --hidden-import "ImageProcessing.cnn" ` --add-data "$(python -c 'import cloudscraper as _; print(_.__path__[0])' | tail -n 1);cloudscraper" ` --add-data "$(python -c 'import opencc as _; print(_.__path__[0])' | tail -n 1);opencc" ` --add-data "$(python -c 'import face_recognition_models as _; print(_.__path__[0])' | tail -n 1);face_recognition_models" ` diff --git a/Makefile b/Makefile index 97e0b6d..023c612 100644 --- a/Makefile +++ b/Makefile @@ -17,8 +17,10 @@ make: @echo "[+]Pyinstaller make" pyinstaller --onefile Movie_Data_Capture.py --hidden-import ADC_function.py --hidden-import core.py \ + --hidden-import "ImageProcessing.cnn" \ --add-data "`python3 -c 'import cloudscraper as _; print(_.__path__[0])' | tail -n 1`:cloudscraper" \ --add-data "`python3 -c 'import opencc as _; print(_.__path__[0])' | tail -n 1`:opencc" \ + --add-data "`python3 -c 'import face_recognition_models as _; print(_.__path__[0])' | tail -n 1`:face_recognition_models" \ --add-data "Img:Img" \ --add-data "config.ini:." \ diff --git a/py_to_exe.ps1 b/py_to_exe.ps1 index 498e7cd..9542421 100644 --- a/py_to_exe.ps1 +++ b/py_to_exe.ps1 @@ -9,7 +9,7 @@ mkdir build mkdir __pycache__ pyinstaller --onefile Movie_Data_Capture.py ` - --hidden-import "ImageProcessing.hog" ` + --hidden-import "ImageProcessing.cnn" ` --add-data "$FACE_RECOGNITION_MODELS;face_recognition_models" ` --add-data "$CLOUDSCRAPER_PATH;cloudscraper" ` --add-data "$OPENCC_PATH;opencc" ` diff --git a/wrapper/FreeBSD.sh b/wrapper/FreeBSD.sh index cf8651a..7a179d9 100755 --- a/wrapper/FreeBSD.sh +++ b/wrapper/FreeBSD.sh @@ -1,8 +1,10 @@ pkg install python38 py38-requests py38-pip py38-lxml py38-pillow py38-cloudscraper py38-pysocks git zip py38-beautifulsoup448 py38-mechanicalsoup pip install pyquery pyinstaller pyinstaller --onefile Movie_Data_Capture.py --hidden-import ADC_function.py --hidden-import core.py \ + --hidden-import "ImageProcessing.cnn" \ --add-data "$(python3.8 -c 'import cloudscraper as _; print(_.__path__[0])' | tail -n 1):cloudscraper" \ --add-data "$(python3.8 -c 'import opencc as _; print(_.__path__[0])' | tail -n 1):opencc" \ + --add-data "$(python3.8 -c 'import face_recognition_models as _; print(_.__path__[0])' | tail -n 1):face_recognition_models" \ --add-data "Img:Img" \ --add-data "config.ini:." \ diff --git a/wrapper/Linux.sh b/wrapper/Linux.sh index 88af8ad..bd0cbf4 100755 --- a/wrapper/Linux.sh +++ b/wrapper/Linux.sh @@ -13,8 +13,10 @@ pip3 install -r requirements.txt pip3 install cloudscraper==1.2.52 pyinstaller --onefile Movie_Data_Capture.py --hidden-import ADC_function.py --hidden-import core.py \ + --hidden-import "ImageProcessing.cnn" \ --add-data "$(python3 -c 'import cloudscraper as _; print(_.__path__[0])' | tail -n 1):cloudscraper" \ --add-data "$(python3 -c 'import opencc as _; print(_.__path__[0])' | tail -n 1):opencc" \ + --add-data "$(python3 -c 'import face_recognition_models as _; print(_.__path__[0])' | tail -n 1):face_recognition_models" \ --add-data "Img:Img" \ --add-data "config.ini:." \