You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Run "volt serve" without any previous configuration in an empty dir:
Traceback (most recent call last):
...
File "/usr/local/lib/python2.7/dist-packages/Volt-0.0.2-py2.7.egg/volt/config/init.py", line 144, in prep_template
if hasattr(user_widget, func_name):
UnboundLocalError: local variable 'user_widget' referenced before assignment
And indeed, volt/config/init.py fails a few lines above "if the user does not have any widget file" and then bombs out on line 144 where the variable "user_widget" is supposed to exist.
The text was updated successfully, but these errors were encountered:
Thanks a lot for the fix :-) (I have a widget.py now, BTW).
A pity that you removed the line "# pass if the user doesn't have any widget file" I found it very helpful in the code that this condition would occur if the user had no local "widget.py". Care to reintroduce a code comment or should I send a pull request for that? :-)
That comment meant that the error should be ignored (instead of setting user_widget to None), so I removed it. I do agree that more comments can be helpful, though, so I'll put back another one in my next push.
Thanks again!
P.S. I'll be reviewing you pull requests soon so I can decide which ones to accept.
Traceback (most recent call last):
...
File "/usr/local/lib/python2.7/dist-packages/Volt-0.0.2-py2.7.egg/volt/config/init.py", line 144, in prep_template
if hasattr(user_widget, func_name):
UnboundLocalError: local variable 'user_widget' referenced before assignment
And indeed, volt/config/init.py fails a few lines above "if the user does not have any widget file" and then bombs out on line 144 where the variable "user_widget" is supposed to exist.
The text was updated successfully, but these errors were encountered: