Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UnboundLocalError: local variable 'orig_file' referenced before assignment #28

Open
DaloroAT opened this issue Jan 11, 2024 · 0 comments

Comments

@DaloroAT
Copy link

DaloroAT commented Jan 11, 2024

Hello streamlit-cropper Developers!

I got the error UnboundLocalError: local variable 'orig_file' referenced before assignment with

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant