peted-davis / WeatherFlow_PiConsole

Raspberry Pi Python console for WeatherFlow Tempest and Smart Home Weather Stations
GNU General Public License v3.0
155 stars 20 forks source link

Going to (setting)menu results in a crash. #75

Closed pjmpessers closed 1 year ago

pjmpessers commented 1 year ago

Hello Peted-Davis.

Still love your app. But have a crash when i'm going to (Setting) menu. Removed and clean installed wfpiconsole and i can go to menu again. Great.

But when i place back the backup of wfpiconsole.kv, displayfield.kv, observationformat.py and the panellayout.kv the problem is back again. Do you know where the problem is coming from?

Thanks again if you could help me.

Traceback (most recent call last): File "kivy/properties.pyx", line 861, in kivy.properties.ObservableDict.getattr KeyError: 'selector_panel'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/home/pi/wfpiconsole/main.py", line 521, in wfpiconsole().run() File "/home/pi/.local/lib/python3.9/site-packages/kivy/app.py", line 950, in run runTouchApp() File "/home/pi/.local/lib/python3.9/site-packages/kivy/base.py", line 582, in runTouchApp EventLoop.mainloop() File "/home/pi/.local/lib/python3.9/site-packages/kivy/base.py", line 347, in mainloop self.idle() File "/home/pi/.local/lib/python3.9/site-packages/kivy/base.py", line 391, in idle self.dispatch_input() File "/home/pi/.local/lib/python3.9/site-packages/kivy/base.py", line 342, in dispatch_input post_dispatch_input(*pop(0)) File "/home/pi/.local/lib/python3.9/site-packages/kivy/base.py", line 308, in post_dispatch_input wid.dispatch('on_touch_up', me) File "kivy/_event.pyx", line 709, in kivy._event.EventDispatcher.dispatch File "/home/pi/.local/lib/python3.9/site-packages/kivy/uix/behaviors/button.py", line 179, in on_touch_up self.dispatch('on_release') File "kivy/_event.pyx", line 705, in kivy._event.EventDispatcher.dispatch File "kivy/_event.pyx", line 1248, in kivy._event.EventObservers.dispatch File "kivy/_event.pyx", line 1132, in kivy._event.EventObservers._dispatch File "/home/pi/.local/lib/python3.9/site-packages/kivy/lang/builder.py", line 57, in custom_callback exec(kvlang.co_value, idmap) File "/home/pi/wfpiconsole/wfpiconsole.kv", line 100, in on_release: Factory.mainMenu().open() File "/home/pi/.local/lib/python3.9/site-packages/kivy/uix/modalview.py", line 221, in open self.dispatch('on_pre_open') File "kivy/_event.pyx", line 709, in kivy._event.EventDispatcher.dispatch File "/home/pi/wfpiconsole/panels/menu.py", line 83, in on_pre_open self.ids.selector_panel.add_widget(station_selector()) File "kivy/properties.pyx", line 864, in kivy.properties.ObservableDict.getattr AttributeError: 'super' object has no attribute 'getattr'

peted-davis commented 1 year ago

Sorry, missed this one! I went back over the update and I'd forgotten that I have made a bunch of changes to the structure of the code - in particular the .kv files that control the layout of the console. That's why when you add your backups back, you are seeing errors.

There is a CustomPanel framework that allows you to design your own panels that will be update safe. You might want to consider looking at this route if you are making significant modifications to the layout. Otherwise I cannot guarantee that updates will not break your custom changes

pjmpessers commented 1 year ago

Ooooh. That seems difficult. But i will look into that. Thanks anyway. And not a problem for your later response. I know you always are there to help.

pjmpessers commented 1 year ago

P.S./ Can you tell me in which file all the adjustments went what was previously in wfpiconsole.kv?

peted-davis commented 1 year ago

Sorry - missed this. Most of the contents of wfpiconsole.kv have been moved to individual files in the kvlang folder

pjmpessers commented 1 year ago

@peted-davis Thank you, Peted. Thanks by you i found it. . So i will make my adjustments. :-)

peted-davis commented 1 year ago

Glad I could help!