kpiorno / kivy3dgui

Pure Kivy library to display and interact with Kivy widgets in a 3D mesh.
MIT License
127 stars 29 forks source link

Fix py3 compatability issues #6

Closed Zen-CODE closed 7 years ago

Zen-CODE commented 7 years ago

So, I get the error below is a few places

Canvas3D: kwargs={'size_hint': (1, 1), 'picking': True, 'shadow': True, 'id': 'CANVAS3D', 'canvas_size': [800, 600]}
[INFO   ] [Shader      ] Read </home/fruitbat/Repos/zenplayer/kivy3dgui/gles2.0/shaders/dop.glsl>
 Traceback (most recent call last):
   File "/home/fruitbat/Repos/zenplayer/main.py", line 40, in <module>
     ZenPlayer().run()
   File "/usr/local/lib/python3.5/dist-packages/kivy/app.py", line 802, in run
     root = self.build()
   File "/home/fruitbat/Repos/zenplayer/main.py", line 33, in build
     self.ctrl = Controller()
   File "/home/fruitbat/Repos/zenplayer/controller.py", line 36, in __init__
     self.playing = PlayingScreen(self, name="main")
   File "/home/fruitbat/Repos/zenplayer/playing.py", line 46, in __init__
     super(PlayingScreen, self).__init__(**kwargs)
   File "/usr/local/lib/python3.5/dist-packages/kivy/uix/relativelayout.py", line 265, in __init__
     super(RelativeLayout, self).__init__(**kw)
   File "/usr/local/lib/python3.5/dist-packages/kivy/uix/floatlayout.py", line 65, in __init__
     super(FloatLayout, self).__init__(**kwargs)
   File "/usr/local/lib/python3.5/dist-packages/kivy/uix/layout.py", line 76, in __init__
     super(Layout, self).__init__(**kwargs)
   File "/usr/local/lib/python3.5/dist-packages/kivy/uix/widget.py", line 345, in __init__
     Builder.apply(self, ignored_consts=self._kwargs_applied_init)
   File "/usr/local/lib/python3.5/dist-packages/kivy/lang/builder.py", line 451, in apply
     self._apply_rule(widget, rule, rule, ignored_consts=ignored_consts)
   File "/usr/local/lib/python3.5/dist-packages/kivy/lang/builder.py", line 564, in _apply_rule
     child = cls(__no_builder=True)
   File "/home/fruitbat/Repos/zenplayer/kivy3dgui/layout3d.py", line 86, in __init__
     self.create_canvas()
   File "/home/fruitbat/Repos/zenplayer/kivy3dgui/layout3d.py", line 133, in create_canvas
     canvas_size=self.canvas_size, id="CANVAS3D")
   File "/home/fruitbat/Repos/zenplayer/kivy3dgui/canvas3d.py", line 197, in __init__
     super(Canvas3D, self).__init__(**kwargs)
   File "/usr/local/lib/python3.5/dist-packages/kivy/uix/floatlayout.py", line 65, in __init__
     super(FloatLayout, self).__init__(**kwargs)
   File "/usr/local/lib/python3.5/dist-packages/kivy/uix/layout.py", line 76, in __init__
     super(Layout, self).__init__(**kwargs)
   File "/usr/local/lib/python3.5/dist-packages/kivy/uix/widget.py", line 337, in __init__
     super(Widget, self).__init__(**kwargs)
   File "kivy/_event.pyx", line 254, in kivy._event.EventDispatcher.__init__ (kivy/_event.c:4922)
 TypeError: object.__init__() takes no parameters

Please see discussion here: https://github.com/kivy/kivy/issues/3650

The long and the short of is it that every kwarg you pass along to super has to be used, otherwise this happens. Breakpointed each and just picked out the ones I saw. Hope that catches everything you need passed on?

kpiorno commented 7 years ago

Oh great :-) I think it catches all passed parameters, but let me check it before merge.