Skip to content

Commit 09e1708

Browse files
handled error
1 parent 1ac815d commit 09e1708

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

glitch_art_display/main.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,11 @@ def gen_frames(image_dir, output, glitch_amount=100, fps=25, num_image_frames=25
143143
print(f'\r[+] Rendering frame {i:,}/{len(frames):,} ({i/len(frames)*100:.1f}%)', end='')
144144
frame = str(frame)
145145
if frame != prev_frame:
146-
read_frame = imageio.imread(frame, pilmode='RGB')
146+
try:
147+
read_frame = imageio.imread(frame, pilmode='RGB')
148+
except Exception as e:
149+
print(f'[!] Error reading {frame}: {e}')
150+
continue
147151
try:
148152
w.append_data(read_frame)
149153
except ValueError:

0 commit comments

Comments
 (0)