Hypernetwork-MonkeyPatch-Extension icon indicating copy to clipboard operation
Hypernetwork-MonkeyPatch-Extension copied to clipboard

Fix unbound local error.

Open aljungberg opened this issue 1 year ago • 2 comments

Fixes UnboundLocalError: local variable 'hypernetwork' referenced before assignment error in finally block if the code in the try-catch raises an exception before hypernetwork has been set.

aljungberg avatar May 23 '23 09:05 aljungberg

Good catch, but its real problem is in train_hypernetwork_external(*args) part, do you have any error log related to it? Usually when it throws error, UnboundLocalError is not really important error, its giving you minor stack trace(...)

aria1th avatar May 23 '23 10:05 aria1th

Oh yeah thanks for asking! I actually already figured the real error out (I specified the wrong template path so it crashed). The extra error on the undefined variable threw me off at first though so hoping this fix might help someone else.

aljungberg avatar May 23 '23 12:05 aljungberg