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

Volt "crash" #1

Closed
spaetz opened this issue Apr 16, 2012 · 3 comments
Closed

Volt "crash" #1

spaetz opened this issue Apr 16, 2012 · 3 comments
Labels
bug Something isn't working

Comments

@spaetz
Copy link
Contributor

spaetz commented Apr 16, 2012

  1. Install volt
  2. 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.

@bow
Copy link
Owner

bow commented Apr 16, 2012

Hi spaetz,

Thanks for reporting the bug :)! I just fixed this in f6d95d... It's showing the proper notification message now instead of crashing.

@spaetz
Copy link
Contributor Author

spaetz commented Apr 16, 2012

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? :-)

@bow
Copy link
Owner

bow commented Apr 16, 2012

Glad to help :).

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.

@bow bow closed this as completed Apr 16, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants