WeatherFlow PiConsole - Archive

Morning @Peter

As you mentioned earlier here, when the API has no data your script doesn’t know what to do. I think I had the case this morning where it stopped somewhere last night. Guess it is related to this API update glitch

For the todo list, make all variables fail proof when no data is received. No hurry. Just a reminder in case.

edit : weird enough it can’t get it to launch

manual lauch gives this error

pi@WF_console:~/wfpiconsole $ python3 main.py
[INFO   ] [Logger      ] Record log in /home/pi/.kivy/logs/kivy_19-01-12_1.txt
[INFO   ] [Kivy        ] v1.11.0.dev0, git-038acbf, 20180915
[INFO   ] [Python      ] v3.5.3 (default, Sep 27 2018, 17:25:39) 
[GCC 6.3.0 20170516]
[INFO   ] [Factory     ] 195 symbols loaded
[INFO   ] [Image       ] Providers: img_tex, img_dds, img_sdl2, img_pil, img_gif (img_ffpyplayer ignored)
[INFO   ] [Window      ] Provider: egl_rpi
[INFO   ] [GL          ] Using the "OpenGL ES 2" graphics system
[INFO   ] [GL          ] Backend used <gl>
[INFO   ] [GL          ] OpenGL version <b'OpenGL ES 2.0'>
[INFO   ] [GL          ] OpenGL vendor <b'Broadcom'>
[INFO   ] [GL          ] OpenGL renderer <b'VideoCore IV HW'>
[INFO   ] [GL          ] OpenGL parsed version: 2, 0
[INFO   ] [GL          ] Shading version <b'OpenGL ES GLSL ES 1.00'>
[INFO   ] [GL          ] Texture max size <2048>
[INFO   ] [GL          ] Texture max units <8>
[INFO   ] [Window      ] virtual keyboard not allowed, single mode, not docked
[INFO   ] [Text        ] Provider: sdl2
2019-01-12 10:13:50+0100 [-] Log opened.
2019-01-12 10:13:53+0100 [-] Starting factory <__main__.WeatherFlowClientFactory object at 0x7193b8f0>
[INFO   ] [GL          ] NPOT texture support is available
Unable to connect to X server
[INFO   ] [ProbeSysfs  ] device match: /dev/input/event0
[INFO   ] [MTD         ] Read event from </dev/input/event0>
[INFO   ] [ProbeSysfs  ] device match: /dev/input/event0
[INFO   ] [HIDInput    ] Read event from </dev/input/event0>
[INFO   ] [Base        ] Start application main loop
[INFO   ] [MTD         ] </dev/input/event0> range position X is 0 - 800
[INFO   ] [Support     ] Starting twisted reactor
[INFO   ] [HIDMotionEvent] using <b'FT5406 memory based driver\x00                                                                                                                                                                                                                                     '>
[INFO   ] [MTD         ] </dev/input/event0> range position Y is 0 - 480
[INFO   ] [HIDMotionEvent] <b'FT5406 memory based driver\x00                                                                                                                                                                                                                                     '> range ABS X position is 0 - 800
[INFO   ] [MTD         ] </dev/input/event0> range touch major is 0 - 0
[INFO   ] [HIDMotionEvent] <b'FT5406 memory based driver\x00                                                                                                                                                                                                                                     '> range ABS Y position is 0 - 480
[INFO   ] [MTD         ] </dev/input/event0> range touch minor is 0 - 0
[INFO   ] [HIDMotionEvent] <b'FT5406 memory based driver\x00                                                                                                                                                                                                                                     '> range position X is 0 - 800
[INFO   ] [MTD         ] </dev/input/event0> range pressure is 0 - 255
[INFO   ] [HIDMotionEvent] <b'FT5406 memory based driver\x00                                                                                                                                                                                                                                     '> range position Y is 0 - 480
[INFO   ] [MTD         ] </dev/input/event0> axes invertion: X is 0, Y is 0
[INFO   ] [MTD         ] </dev/input/event0> rotation set to 0
[INFO   ] [Base        ] Leaving application in progress...
[INFO   ] [Support     ] Stopping twisted threads
[INFO   ] [Support     ] Shutting down twisted reactor
2019-01-12 10:13:54+0100 [-] Traceback (most recent call last):
2019-01-12 10:13:54+0100 [-]   File "main.py", line 2109, in <module>
2019-01-12 10:13:54+0100 [-]     WeatherFlowPiConsole().run()
2019-01-12 10:13:54+0100 [-]   File "/usr/local/lib/python3.5/dist-packages/kivy/app.py", line 826, in run
2019-01-12 10:13:54+0100 [-]     runTouchApp()
2019-01-12 10:13:54+0100 [-]   File "/usr/local/lib/python3.5/dist-packages/kivy/base.py", line 502, in runTouchApp
2019-01-12 10:13:54+0100 [-]     EventLoop.window.mainloop()
2019-01-12 10:13:54+0100 [-]   File "/usr/local/lib/python3.5/dist-packages/kivy/core/window/window_egl_rpi.py", line 92, in mainloop
2019-01-12 10:13:54+0100 [-]     self._mainloop()
2019-01-12 10:13:54+0100 [-]   File "/usr/local/lib/python3.5/dist-packages/kivy/core/window/window_egl_rpi.py", line 87, in _mainloop
2019-01-12 10:13:54+0100 [-]     EventLoop.idle()
2019-01-12 10:13:54+0100 [-]   File "/usr/local/lib/python3.5/dist-packages/kivy/base.py", line 337, in idle
2019-01-12 10:13:54+0100 [-]     Clock.tick()
2019-01-12 10:13:54+0100 [-]   File "/usr/local/lib/python3.5/dist-packages/kivy/clock.py", line 581, in tick
2019-01-12 10:13:54+0100 [-]     self._process_events()
2019-01-12 10:13:54+0100 [-]   File "kivy/_clock.pyx", line 384, in kivy._clock.CyClockBase._process_events
2019-01-12 10:13:54+0100 [-]   File "kivy/_clock.pyx", line 414, in kivy._clock.CyClockBase._process_events
2019-01-12 10:13:54+0100 [-]   File "kivy/_clock.pyx", line 412, in kivy._clock.CyClockBase._process_events
2019-01-12 10:13:54+0100 [-]   File "kivy/_clock.pyx", line 167, in kivy._clock.ClockEvent.tick
2019-01-12 10:13:54+0100 [-]   File "main.py", line 1819, in SagerForecast
2019-01-12 10:13:54+0100 [-]     Sky['Time'] = [item[0] if item[0] != None else NaN for item in Sky['obs']]
2019-01-12 10:13:54+0100 [-] TypeError: 'NoneType' object is not iterable
``