Open DaloroAT opened 9 months ago
Hello streamlit-cropper Developers!
I got the error UnboundLocalError: local variable 'orig_file' referenced before assignment with
UnboundLocalError: local variable 'orig_file' referenced before assignment
st_cropper(Image.open(file), realtime_update=True, box_color='#0000FF', should_resize_image=False)
That's because the variable orig_file defined in a block with if should_resize_image: here but always used later even if should_resize_image is False and orig_file is not defined.
orig_file
if should_resize_image:
should_resize_image
False
Hello streamlit-cropper Developers!
I got the error
UnboundLocalError: local variable 'orig_file' referenced before assignment
withThat's because the variable
orig_file
defined in a block withif should_resize_image:
here but always used later even ifshould_resize_image
isFalse
andorig_file
is not defined.