mrworf / photoframe

Software to pull random photos from Google Photos and show them, like a photo frame
GNU General Public License v3.0
215 stars 38 forks source link

Photoframe will not start #195

Closed thomaswinb closed 3 years ago

thomaswinb commented 3 years ago

debug.pdf The topic is miss leading. Photoframe start but it fails to load any images.

Jun 27 11:22:49 Photoframe photoframe[559]: Exception in thread Thread-5: Jun 27 11:22:49 Photoframe photoframe[559]: Traceback (most recent call last): Jun 27 11:22:49 Photoframe photoframe[559]: File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner Jun 27 11:22:49 Photoframe photoframe[559]: self.run() Jun 27 11:22:49 Photoframe photoframe[559]: File "/usr/lib/python2.7/threading.py", line 754, in run Jun 27 11:22:49 Photoframe photoframe[559]: self.target(*self.args, **self.__kwargs) Jun 27 11:22:49 Photoframe photoframe[559]: File "/root/photoframe/modules/slideshow.py", line 275, in presentation Jun 27 11:22:49 Photoframe photoframe[559]: self.startupScreen() Jun 27 11:22:49 Photoframe photoframe[559]: File "/root/photoframe/modules/slideshow.py", line 160, in startupScreen Jun 27 11:22:49 Photoframe photoframe[559]: self.display.message('Starting in %d' % (cd)) Jun 27 11:22:49 Photoframe photoframe[559]: File "/root/photoframe/modules/display.py", line 184, in message Jun 27 11:22:49 Photoframe photoframe[559]: if helper.getDeviceIp() is not None and showConfig: Jun 27 11:22:49 Photoframe photoframe[559]: File "/root/photoframe/modules/helper.py", line 89, in getDeviceIp Jun 27 11:22:49 Photoframe photoframe[559]: if 'default' in netifaces.gateways() and netifaces.AF_INET in netifaces.gateways()['default']: Jun 27 11:22:49 Photoframe photoframe[559]: UnboundLocalError: local variable 'netifaces' referenced before assignment

jmhammond commented 3 years ago

Same error log:

Jun 27 03:15:35 photoframe photoframe[29446]: 2021-06-27 03:15:35,675 - INFO - Registering URL /keywords/ to RouteKeywords
Jun 27 03:15:35 photoframe photoframe[29446]: 2021-06-27 03:15:35,677 - INFO - Registering URL /keywords//add to RouteKeywords
Jun 27 03:15:35 photoframe photoframe[29446]: 2021-06-27 03:15:35,679 - INFO - Registering URL /keywords//delete to RouteKeywords
Jun 27 03:15:35 photoframe photoframe[29446]: 2021-06-27 03:15:35,680 - INFO - Registering URL /keywords//source/ to RouteKeywords
Jun 27 03:15:35 photoframe photoframe[29446]: 2021-06-27 03:15:35,682 - INFO - Registering URL /keywords//details/ to RouteKeywords
Jun 27 03:15:35 photoframe photoframe[29446]: 2021-06-27 03:15:35,685 - INFO - Registering URL /rotation to RouteOrientation
Jun 27 03:15:35 photoframe photoframe[29446]: 2021-06-27 03:15:35,686 - INFO - Registering URL /rotation/ to RouteOrientation
Jun 27 03:15:35 photoframe photoframe[29446]: 2021-06-27 03:15:35,688 - INFO - Registering URL /overscan to RouteOverscan
Jun 27 03:15:35 photoframe photoframe[29446]: 2021-06-27 03:15:35,689 - INFO - Registering URL /overscan/ to RouteOverscan
Jun 27 03:15:35 photoframe photoframe[29446]: 2021-06-27 03:15:35,691 - INFO - Registering URL /maintenance/ to RouteMaintenance
Jun 27 03:15:35 photoframe photoframe[29446]: 2021-06-27 03:15:35,693 - INFO - Registering URL /details/ to RouteDetails
Jun 27 03:15:35 photoframe photoframe[29446]: 2021-06-27 03:15:35,695 - INFO - Registering URL /upload/ to RouteUpload
Jun 27 03:15:35 photoframe photoframe[29446]: 2021-06-27 03:15:35,696 - INFO - Registering URL /callback to RouteOAuthLink
Jun 27 03:15:35 photoframe photoframe[29446]: 2021-06-27 03:15:35,697 - INFO - Registering URL /service//link to RouteOAuthLink
Jun 27 03:15:35 photoframe photoframe[29446]: 2021-06-27 03:15:35,699 - INFO - Registering URL /service//oauth to RouteOAuthLink
Jun 27 03:15:35 photoframe photoframe[29446]: 2021-06-27 03:15:35,701 - INFO - Registering URL /service/ to RouteService
Jun 27 03:15:35 photoframe photoframe[29446]: 2021-06-27 03:15:35,703 - INFO - Registering URL /control/ to RouteControl
Jun 27 03:15:35 photoframe photoframe[29446]: 2021-06-27 03:15:35,704 - INFO - Registering URL /events to RouteEvents
Jun 27 03:15:35 photoframe photoframe[29446]: 2021-06-27 03:15:35,705 - INFO - Registering URL /events/ to RouteEvents
Jun 27 03:15:35 photoframe photoframe[29446]: 2021-06-27 03:15:35,707 - INFO - Registering URL /events/remove/ to RouteEvents
Jun 27 03:15:37 photoframe photoframe[29446]:  * Serving Flask app "modules.server" (lazy loading)
Jun 27 03:15:37 photoframe photoframe[29446]:  * Environment: production
Jun 27 03:15:37 photoframe photoframe[29446]:    WARNING: Do not use the development server in a production environment.
Jun 27 03:15:37 photoframe photoframe[29446]:    Use a production WSGI server instead.
Jun 27 03:15:37 photoframe photoframe[29446]:  * Debug mode: off
Jun 27 03:15:37 photoframe photoframe[29446]: Exception in thread Thread-5:
Jun 27 03:15:37 photoframe photoframe[29446]: Traceback (most recent call last):
Jun 27 03:15:37 photoframe photoframe[29446]:   File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
Jun 27 03:15:37 photoframe photoframe[29446]:     self.run()
Jun 27 03:15:37 photoframe photoframe[29446]:   File "/usr/lib/python2.7/threading.py", line 754, in run
Jun 27 03:15:37 photoframe photoframe[29446]:     self.__target(*self.__args, **self.__kwargs)
Jun 27 03:15:37 photoframe photoframe[29446]:   File "/root/photoframe/modules/slideshow.py", line 275, in presentation
Jun 27 03:15:37 photoframe photoframe[29446]:     self.startupScreen()
Jun 27 03:15:37 photoframe photoframe[29446]:   File "/root/photoframe/modules/slideshow.py", line 160, in startupScreen
Jun 27 03:15:37 photoframe photoframe[29446]:     self.display.message('Starting in %d' % (cd))
Jun 27 03:15:37 photoframe photoframe[29446]:   File "/root/photoframe/modules/display.py", line 184, in message
Jun 27 03:15:37 photoframe photoframe[29446]:     if helper.getDeviceIp() is not None and showConfig:
Jun 27 03:15:37 photoframe photoframe[29446]:   File "/root/photoframe/modules/helper.py", line 89, in getDeviceIp
Jun 27 03:15:37 photoframe photoframe[29446]:     if 'default' in netifaces.gateways() and netifaces.AF_INET in netifaces.gateways()['default']:
Jun 27 03:15:37 photoframe photoframe[29446]: UnboundLocalError: local variable 'netifaces' referenced before assignment
Jun 27 03:16:35 photoframe photoframe[29446]: display_power=0
Jun 27 07:00:46 photoframe photoframe[29446]: display_power=1
Jun 27 07:12:56 photoframe photoframe[572]: 2021-06-27 07:12:56,902 - INFO - Loading service USB_Photos from svc_usb.py
Jun 27 07:12:56 photoframe photoframe[572]: 2021-06-27 07:12:56,909 - INFO - Loading service PicasaWeb from svc_picasaweb.py
Jun 27 07:12:56 photoframe photoframe[572]: 2021-06-27 07:12:56,915 - INFO - Loading service GooglePhotos from svc_googlephotos.py
Jun 27 07:12:56 photoframe photoframe[572]: 2021-06-27 07:12:56,919 - INFO - Loading service SimpleUrl from svc_simpleurl.py
Jun 27 07:12:56 photoframe photoframe[572]: 2021-06-27 07:12:56,935 - INFO - ColorSensor not available
Jun 27 07:12:56 photoframe photoframe[572]: 2021-06-27 07:12:56,938 - INFO - GPIO shutdown can be triggered by GPIO 26
Jun 27 07:12:57 photoframe photoframe[572]: 2021-06-27 07:12:57,192 - INFO - Cache is set to True
Jun 27 07:12:57 photoframe photoframe[572]: 2021-06-27 07:12:57,197 - WARNING - "/boot/http-auth.json" doesn't contain a user and password key
Jun 27 07:12:57 photoframe photoframe[572]: 2021-06-27 07:12:57,197 - INFO - No http-auth.json found, disabling http authentication
Jun 27 07:12:57 photoframe photoframe[572]: 2021-06-27 07:12:57,221 - INFO - Registering URL /options/ to RouteOptions (simple)
Jun 27 07:12:57 photoframe photoframe[572]: 2021-06-27 07:12:57,223 - INFO - Registering URL /options// to RouteOptions (simple)
Jun 27 07:12:57 photoframe photoframe[572]: 2021-06-27 07:12:57,233 - INFO - Registering URL / to RoutePages (simple)
Jun 27 07:12:57 photoframe photoframe[572]: 2021-06-27 07:12:57,234 - INFO - Registering URL / to RoutePages (simple)
Jun 27 07:12:57 photoframe photoframe[572]: 2021-06-27 07:12:57,242 - INFO - Registering URL /debug to RouteDebug (simple)
Jun 27 07:12:57 photoframe photoframe[572]: 2021-06-27 07:12:57,252 - INFO - Registering URL /setting to RouteSettings
Jun 27 07:12:57 photoframe photoframe[572]: 2021-06-27 07:12:57,253 - INFO - Registering URL /setting/ to RouteSettings
Jun 27 07:12:57 photoframe photoframe[572]: 2021-06-27 07:12:57,255 - INFO - Registering URL /setting// to RouteSettings
Jun 27 07:12:57 photoframe photoframe[572]: 2021-06-27 07:12:57,257 - INFO - Registering URL /keywords//help to RouteKeywords
Jun 27 07:12:57 photoframe photoframe[572]: 2021-06-27 07:12:57,259 - INFO - Registering URL /keywords/ to RouteKeywords
Jun 27 07:12:57 photoframe photoframe[572]: 2021-06-27 07:12:57,260 - INFO - Registering URL /keywords//add to RouteKeywords
Jun 27 07:12:57 photoframe photoframe[572]: 2021-06-27 07:12:57,262 - INFO - Registering URL /keywords//delete to RouteKeywords
Jun 27 07:12:57 photoframe photoframe[572]: 2021-06-27 07:12:57,264 - INFO - Registering URL /keywords//source/ to RouteKeywords
Jun 27 07:12:57 photoframe photoframe[572]: 2021-06-27 07:12:57,266 - INFO - Registering URL /keywords//details/ to RouteKeywords
Jun 27 07:12:57 photoframe photoframe[572]: 2021-06-27 07:12:57,268 - INFO - Registering URL /rotation to RouteOrientation
Jun 27 07:12:57 photoframe photoframe[572]: 2021-06-27 07:12:57,269 - INFO - Registering URL /rotation/ to RouteOrientation
Jun 27 07:12:57 photoframe photoframe[572]: 2021-06-27 07:12:57,271 - INFO - Registering URL /overscan to RouteOverscan
Jun 27 07:12:57 photoframe photoframe[572]: 2021-06-27 07:12:57,273 - INFO - Registering URL /overscan/ to RouteOverscan
Jun 27 07:12:57 photoframe photoframe[572]: 2021-06-27 07:12:57,275 - INFO - Registering URL /maintenance/ to RouteMaintenance
Jun 27 07:12:57 photoframe photoframe[572]: 2021-06-27 07:12:57,276 - INFO - Registering URL /details/ to RouteDetails
Jun 27 07:12:57 photoframe photoframe[572]: 2021-06-27 07:12:57,278 - INFO - Registering URL /upload/ to RouteUpload
Jun 27 07:12:57 photoframe photoframe[572]: 2021-06-27 07:12:57,280 - INFO - Registering URL /callback to RouteOAuthLink
Jun 27 07:12:57 photoframe photoframe[572]: 2021-06-27 07:12:57,281 - INFO - Registering URL /service//link to RouteOAuthLink
Jun 27 07:12:57 photoframe photoframe[572]: 2021-06-27 07:12:57,283 - INFO - Registering URL /service//oauth to RouteOAuthLink
Jun 27 07:12:57 photoframe photoframe[572]: 2021-06-27 07:12:57,285 - INFO - Registering URL /service/ to RouteService
Jun 27 07:12:57 photoframe photoframe[572]: 2021-06-27 07:12:57,286 - INFO - Registering URL /control/ to RouteControl
Jun 27 07:12:57 photoframe photoframe[572]: 2021-06-27 07:12:57,288 - INFO - Registering URL /events to RouteEvents
Jun 27 07:12:57 photoframe photoframe[572]: 2021-06-27 07:12:57,290 - INFO - Registering URL /events/ to RouteEvents
Jun 27 07:12:57 photoframe photoframe[572]: 2021-06-27 07:12:57,292 - INFO - Registering URL /events/remove/ to RouteEvents
Jun 27 07:12:58 photoframe photoframe[572]:  * Serving Flask app "modules.server" (lazy loading)
Jun 27 07:12:58 photoframe photoframe[572]:  * Environment: production
Jun 27 07:12:58 photoframe photoframe[572]:    WARNING: Do not use the development server in a production environment.
Jun 27 07:12:58 photoframe photoframe[572]:    Use a production WSGI server instead.
Jun 27 07:12:58 photoframe photoframe[572]:  * Debug mode: off
Jun 27 07:12:59 photoframe photoframe[572]: Exception in thread Thread-5:
Jun 27 07:12:59 photoframe photoframe[572]: Traceback (most recent call last):
Jun 27 07:12:59 photoframe photoframe[572]:   File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
Jun 27 07:12:59 photoframe photoframe[572]:     self.run()
Jun 27 07:12:59 photoframe photoframe[572]:   File "/usr/lib/python2.7/threading.py", line 754, in run
Jun 27 07:12:59 photoframe photoframe[572]:     self.__target(*self.__args, **self.__kwargs)
Jun 27 07:12:59 photoframe photoframe[572]:   File "/root/photoframe/modules/slideshow.py", line 275, in presentation
Jun 27 07:12:59 photoframe photoframe[572]:     self.startupScreen()
Jun 27 07:12:59 photoframe photoframe[572]:   File "/root/photoframe/modules/slideshow.py", line 160, in startupScreen
Jun 27 07:12:59 photoframe photoframe[572]:     self.display.message('Starting in %d' % (cd))
Jun 27 07:12:59 photoframe photoframe[572]:   File "/root/photoframe/modules/display.py", line 184, in message
Jun 27 07:12:59 photoframe photoframe[572]:     if helper.getDeviceIp() is not None and showConfig:
Jun 27 07:12:59 photoframe photoframe[572]:   File "/root/photoframe/modules/helper.py", line 89, in getDeviceIp
Jun 27 07:12:59 photoframe photoframe[572]:     if 'default' in netifaces.gateways() and netifaces.AF_INET in netifaces.gateways()['default']:
Jun 27 07:12:59 photoframe photoframe[572]: UnboundLocalError: local variable 'netifaces' referenced before assignment

Here's where netifaces was removed in the commit 22 hours ago. I think you'll want to move the except block back down after the all the instances of netifaces.

brewer-michael commented 3 years ago

Same issue here, this appears to have started after the most recent update

mrworf commented 3 years ago

Fix is coming in the hour, will update here as soon as available

mrworf commented 3 years ago

Update has been tested and pushed, sorry about the crashes. Forcing an update should solve the issue. You can create the file forceupdate.txt on the SD card to force update on boot if you don't want to mess around with SSH

jmhammond commented 3 years ago

I've confirmed that the update works on my install. Thanks for the quick fix!

thomaswinb commented 3 years ago

It works here to. Update + a reboot. I'm closing this one now. Thanks for the quick support.