From 2dde9220e970e4dafe48bddf53ff9a7536a88da0 Mon Sep 17 00:00:00 2001 From: mohamed-ehab51 Date: Mon, 18 Dec 2023 00:17:09 +0200 Subject: [PATCH 1/2] updating and solving some issues appeared while running --- gui/header.py | 5 +++-- gui/requirements.txt | 2 +- gui/requirements_win.txt | 2 +- gui/thumbnail.py | 4 +++- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/gui/header.py b/gui/header.py index 26f7ae7..9d0f2c9 100644 --- a/gui/header.py +++ b/gui/header.py @@ -16,8 +16,9 @@ def __init__(self, filename, parent=None): self.temp_dir = QTemporaryDir() if self.temp_dir.isValid(): temp_file = os.path.join(self.temp_dir.path(), "structure.html") - - p = run([exiftool_exe(), "-htmldump0", filename], stdout=PIPE) + input_data = b"\n" + command = [exiftool_exe(), "-htmldump0", filename] + p = run(command, input=input_data, stdout=PIPE) with open(temp_file, "w") as file: file.write(p.stdout.decode("utf-8")) diff --git a/gui/requirements.txt b/gui/requirements.txt index 6eec7b1..00fb4b2 100644 --- a/gui/requirements.txt +++ b/gui/requirements.txt @@ -6,7 +6,7 @@ matplotlib==3.8.2 opencv-contrib-python-headless==4.6.0.66 pandas==1.5.0 pyside6==6.4.0.1 -python-magic==0.4.27 +python-magic-bin==0.4.14 rawpy==0.17.3 scikit-image==0.22.0 scikit-learn==1.3.2 diff --git a/gui/requirements_win.txt b/gui/requirements_win.txt index 6eec7b1..00fb4b2 100644 --- a/gui/requirements_win.txt +++ b/gui/requirements_win.txt @@ -6,7 +6,7 @@ matplotlib==3.8.2 opencv-contrib-python-headless==4.6.0.66 pandas==1.5.0 pyside6==6.4.0.1 -python-magic==0.4.27 +python-magic-bin==0.4.14 rawpy==0.17.3 scikit-image==0.22.0 scikit-learn==1.3.2 diff --git a/gui/thumbnail.py b/gui/thumbnail.py index 0f3c5c5..a148b96 100644 --- a/gui/thumbnail.py +++ b/gui/thumbnail.py @@ -15,7 +15,9 @@ def __init__(self, filename, image, parent=None): temp_file = QTemporaryFile() if temp_file.open(): - output = subprocess.check_output([exiftool_exe(), "-b", "-ThumbnailImage", filename]) + input_data = b"\n" + command = [exiftool_exe(), "-b", "-ThumbnailImage", filename] + output = subprocess.check_output(command,input=input_data) temp_name = temp_file.fileName() with open(temp_name, "wb") as file: file.write(output) From 8bd15b20b0c34675da7eed7555e1e97fe66f438a Mon Sep 17 00:00:00 2001 From: mohamed-ehab51 Date: Mon, 18 Dec 2023 00:57:14 +0200 Subject: [PATCH 2/2] updating and solving some issues appeared while running --- gui/quality.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gui/quality.py b/gui/quality.py index fcdf72f..c6b8f8d 100644 --- a/gui/quality.py +++ b/gui/quality.py @@ -73,8 +73,10 @@ def __init__(self, filename, image, parent=None): try: if temp_file.open(): copyfile(filename, temp_file.fileName()) + input_data = b"\n" subprocess.run( [exiftool_exe(), "-all=", "-overwrite_original", temp_file.fileName()], + input=input_data, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL, )