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 'size' referenced before assignment #31

Open
fk-windy opened this issue Jan 4, 2023 · 2 comments · May be fixed by #32
Open

UnboundLocalError: local variable 'size' referenced before assignment #31

fk-windy opened this issue Jan 4, 2023 · 2 comments · May be fixed by #32

Comments

@fk-windy
Copy link

fk-windy commented Jan 4, 2023

I'd like to report small bug in pre-release version 3.0.0, which I'm trying to use as library call from python.

The bug is in dl_2_file. When MOTU server replies with error, this error is detected here, which is logged here and after that this line raises UnboundLocalError: local variable 'size' referenced before assignment exception because variable size is defined here after raising first exception.

Could this be fixed? It would be also very useful if the exception that is just logged with "Download failed" got passed back to caller instead of just being logged.

Thank you very much for your time 🙂

@clstoulouse
Copy link
Owner

Hi,

Thank you for your interest in Motu Project. Motu is an open source project and so you are free to provide a pull request in order to improve this excellent behaviour that you mention.
It will be then easier for us to test and to integrate it your update.

Best regards,
Motu Dev Team

@fk-windy fk-windy linked a pull request Jan 4, 2023 that will close this issue
@fk-windy
Copy link
Author

fk-windy commented Jan 4, 2023

Done

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

Successfully merging a pull request may close this issue.

2 participants