-
-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed is_print_console paramenter on the main.py
- Loading branch information
Showing
4 changed files
with
17 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
# -*- encoding: utf-8 -*- | ||
# @Author: SWHL | ||
# @Contact: [email protected] | ||
from .logger import logger | ||
from .main import RapidVideoSubFinderOCR | ||
from .rapid_videocr import RapidVideOCR, RapidVideOCRError |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
# @Author: SWHL | ||
# @Contact: [email protected] | ||
import sys | ||
import traceback | ||
from pathlib import Path | ||
|
||
from PyQt5.QtCore import QRect, QSettings | ||
|
@@ -21,7 +22,7 @@ | |
QWidget, | ||
) | ||
|
||
from rapid_videocr import RapidVideOCR, RapidVideoSubFinderOCR | ||
from rapid_videocr import RapidVideOCR, RapidVideoSubFinderOCR, logger | ||
|
||
|
||
class RapidVideOCRUI(QWidget): | ||
|
@@ -388,7 +389,11 @@ def only_ocr(self, is_select_mode: bool, batch_num: str): | |
|
||
save_dir = Path(save_full_path).parent | ||
save_name = Path(save_full_path).stem | ||
extractor(img_dir, save_dir, save_name) | ||
try: | ||
extractor(img_dir, save_dir, save_name) | ||
except Exception as e: | ||
error = traceback.format_exc() | ||
logger.error(error) | ||
|
||
def vsf_ocr(self, is_select_mode: bool, batch_num: str): | ||
vsf_exe_path = self.le_vsf_path.text().strip() | ||
|
@@ -413,7 +418,11 @@ def vsf_ocr(self, is_select_mode: bool, batch_num: str): | |
concat_batch=int(batch_num), | ||
is_print_console=False, | ||
) | ||
extractor(video_path, save_dir) | ||
try: | ||
extractor(video_path, save_dir) | ||
except Exception: | ||
error = traceback.format_exc() | ||
logger.error(error) | ||
|
||
def click_cancel( | ||
self, | ||
|