sharnett / myweather

simple weather forecast webpage
www.seanweather.com
6 stars 3 forks source link

Location should never be None #28

Open sharnett opened 7 years ago

sharnett commented 7 years ago

Exception on / [GET] Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1817, in wsgi_app response = self.full_dispatch_request() File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1477, in full_dispatch_request rv = self.handle_user_exception(e) File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1381, in handle_user_exception reraise(exc_type, exc_value, tb) File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1475, in full_dispatch_request rv = self.dispatch_request() File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1461, in dispatch_request return self.view_functionsrule.endpoint File "./main.py", line 179, in home sw.update() File "./main.py", line 113, in update self.update_weather_data() File "./main.py", line 147, in update_weather_data if self.location.cache and self._was_recently_updated(): AttributeError: 'NoneType' object has no attribute 'cache'

nmyk commented 6 years ago

Today's your lucky day. We have the whole day to work on open source for https://hacktoberfest.digitalocean.com/

I'm on it