openUC2 / UC2-Software-GIT

This repository hosts all necessary software for the UC2 project.
https://useetoo.org
Other
12 stars 6 forks source link

GUI non-functional (possibly Kivy compatibility change) #17

Closed jhaliburton closed 3 years ago

jhaliburton commented 3 years ago

Hi, love this project, just building one myself. Run into a bit of problem with the GUI. I've got Kivy installed on an RPI 2B+ and have verified that the installation is working through the kivy github tutorial. Worked through this GUI tutorial with no hiccups until running the GUI and got this error code: [ WARNING ] [ kivy ] stderr: Traceback (most recent call last): [ WARNING ] [ kivy ] stderr: File "/home/UC21/berryconda3/envs/UC2env/lib/python3.6/site-packages/kivy/lang/builder.py", line 706, in _apply_rule [ WARNING ] [ kivy ] stderr: setattr(widget_set, key, value) [ WARNING ] [ kivy ] stderr: File "kivy/weakproxy.pyx", line 35, in kivy.weakproxy.WeakProxy.__setattr__ [ WARNING ] [ kivy ] stderr: File "kivy/properties.pyx", line 498, in kivy.properties.Property.__set__ [ WARNING ] [ kivy ] stderr: File "kivy/properties.pyx", line 542, in kivy.properties.Property.set [ WARNING ] [ kivy ] stderr: File "kivy/properties.pyx", line 533, in kivy.properties.Property.set [ WARNING ] [ kivy ] stderr: File "kivy/properties.pyx", line 1253, in kivy.properties.OptionProperty.check [ WARNING ] [ kivy ] stderr: ValueError: GridLayout.orientation is set to an invalid option 'horizontal'. Must be one of: ['lr-tb', 'tb-lr', 'rl-tb', 'tb-rl', 'lr-bt', 'bt-lr', 'rl-bt', 'bt-rl'] [ WARNING ] [ kivy ] stderr: [ WARNING ] [ kivy ] stderr: During handling of the above exception, another exception occurred: [ WARNING ] [ kivy ] stderr: [ WARNING ] [ kivy ] stderr: Traceback (most recent call last): [ WARNING ] [ kivy ] stderr: File "main.py", line 318, in <module> [ WARNING ] [ kivy ] stderr: FluidiscopeApp().run() [ WARNING ] [ kivy ] stderr: File "/home/UC21/berryconda3/envs/UC2env/lib/python3.6/site-packages/kivy/app.py", line 949, in run [ WARNING ] [ kivy ] stderr: self._run_prepare() [ WARNING ] [ kivy ] stderr: File "/home/UC21/berryconda3/envs/UC2env/lib/python3.6/site-packages/kivy/app.py", line 919, in _run_prepare [ WARNING ] [ kivy ] stderr: root = self.build() [ WARNING ] [ kivy ] stderr: File "main.py", line 298, in build [ WARNING ] [ kivy ] stderr: self.fluidiscope = Fluidiscope(app=self) [ WARNING ] [ kivy ] stderr: File "main.py", line 248, in __init__ [ WARNING ] [ kivy ] stderr: super(Fluidiscope, self).__init__() # **kwargs [ WARNING ] [ kivy ] stderr: File "/home/UC21/berryconda3/envs/UC2env/lib/python3.6/site-packages/kivy/uix/boxlayout.py", line 145, in __init__ [ WARNING ] [ kivy ] stderr: super(BoxLayout, self).__init__(**kwargs) [ WARNING ] [ kivy ] stderr: File "/home/UC21/berryconda3/envs/UC2env/lib/python3.6/site-packages/kivy/uix/layout.py", line 76, in __init__ [ WARNING ] [ kivy ] stderr: super(Layout, self).__init__(**kwargs) [ WARNING ] [ kivy ] stderr: File "/home/UC21/berryconda3/envs/UC2env/lib/python3.6/site-packages/kivy/uix/widget.py", line 361, in __init__ [ WARNING ] [ kivy ] stderr: rule_children=rule_children) [ WARNING ] [ kivy ] stderr: File "/home/UC21/berryconda3/envs/UC2env/lib/python3.6/site-packages/kivy/uix/widget.py", line 465, in apply_class_lang_rules [ WARNING ] [ kivy ] stderr: rule_children=rule_children) [ WARNING ] [ kivy ] stderr: File "/home/UC21/berryconda3/envs/UC2env/lib/python3.6/site-packages/kivy/lang/builder.py", line 544, in apply [ WARNING ] [ kivy ] stderr: rule_children=rule_children) [ WARNING ] [ kivy ] stderr: File "/home/UC21/berryconda3/envs/UC2env/lib/python3.6/site-packages/kivy/lang/builder.py", line 713, in _apply_rule [ WARNING ] [ kivy ] stderr: e), cause=tb) [ WARNING ] [ kivy ] stderr: kivy.lang.builder.BuilderException: Parser: File "/home/UC21/UC2/UC2-GUI/fluidiscope.kv", line 1278: [ WARNING ] [ kivy ] stderr: ... [ WARNING ] [ kivy ] stderr: 1276: text: 'POS\nIM' [ WARNING ] [ kivy ] stderr: 1277: GridLayout: [ WARNING ] [ kivy ] stderr: >> 1278: orientation: 'horizontal' [ WARNING ] [ kivy ] stderr: 1279: cols: 3 [ WARNING ] [ kivy ] stderr: 1280: size_hint_x: 0.4 [ WARNING ] [ kivy ] stderr: ... [ WARNING ] [ kivy ] stderr: ValueError: GridLayout.orientation is set to an invalid option 'horizontal'. Must be one of: ['lr-tb', 'tb-lr', 'rl-tb', 'tb-rl', 'lr-bt', 'bt-lr', 'rl-bt', 'bt-rl'] [ WARNING ] [ kivy ] stderr: File "/home/UC21/berryconda3/envs/UC2env/lib/python3.6/site-packages/kivy/lang/builder.py", line 706, in _apply_rule [ WARNING ] [ kivy ] stderr: setattr(widget_set, key, value) [ WARNING ] [ kivy ] stderr: File "kivy/weakproxy.pyx", line 35, in kivy.weakproxy.WeakProxy.__setattr__ [ WARNING ] [ kivy ] stderr: File "kivy/properties.pyx", line 498, in kivy.properties.Property.__set__ [ WARNING ] [ kivy ] stderr: File "kivy/properties.pyx", line 542, in kivy.properties.Property.set [ WARNING ] [ kivy ] stderr: File "kivy/properties.pyx", line 533, in kivy.properties.Property.set [ WARNING ] [ kivy ] stderr: File "kivy/properties.pyx", line 1253, in kivy.properties.OptionProperty.check [ WARNING ] [ kivy ] stderr:

Seems one issue is that GridLayout.orientation no longer supports 'horizontal'. This could be a change in the kivy distribution? changing linke 1278 of fluidiscope.kv from 'horiztonal' to 'lr-tb' fixes the issue.

beniroquai commented 3 years ago

Hey, thanks for reaching out! May I ask you what's the version you have installed?

Would you mind to have a look if the following example works: https://github.com/mrichardson23/rpi-kivy-screen

Would you also mind to check if the installation works following these steps: https://kivy.org/doc/stable-1.10.1/installation/installation-rpi.html

renerichter commented 3 years ago

@jhaliburton thank you very much for reaching out. Have you been successful? In our particular use-case (for this GUI) it is not relevant there. Please try to comment-out line 1278 by adding a "#" in front of it.

renerichter commented 3 years ago

@jhaliburton did you have any success? :)

renerichter commented 3 years ago

I will mark this closed as it seems that no further fix was needed.

beniroquai commented 3 years ago

Hey, I figured out, that you have to outcomment this value. I experienced it when testing on Windows.