Skip to content

Commit 040b97f

Browse files
better error handling
1 parent 09e1708 commit 040b97f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

glitch_art_display/main.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -146,13 +146,13 @@ def gen_frames(image_dir, output, glitch_amount=100, fps=25, num_image_frames=25
146146
try:
147147
read_frame = imageio.imread(frame, pilmode='RGB')
148148
except Exception as e:
149-
print(f'[!] Error reading {frame}: {e}')
149+
print(f'\n[!] Error reading {frame}: {e}')
150150
continue
151151
try:
152152
w.append_data(read_frame)
153-
except ValueError:
154-
print(f'[!] {frame}')
155-
raise
153+
except ValueError as e:
154+
print(f'\n[!] Error appending {frame}: {e}')
155+
continue
156156
prev_frame = str(frame)
157157
finally:
158158
with suppress(Exception):

0 commit comments

Comments
 (0)