I am trying to make kivy work on my Ubuntu system. I followed the instructions from their wesbite.
But when I try to run the following hello world code from their website:
import kivy
kivy.require('1.5.1') # replace with your current kivy version !
from kivy.app import App
from kivy.uix.button import Button
class MyApp(App):
def build(self):
return Button(text='Hello World')
if __name__ == '__main__':
MyApp().run()
I get following error :
[INFO ] Kivy v1.5.1
[INFO ] [Logger ] Record log in /home/malik/.kivy/logs/kivy_13-03-08_6.txt
[INFO ] [Factory ] 137 symbols loaded
[DEBUG ] [Cache ] register <kv.lang> with limit=None, timeout=Nones
[DEBUG ] [Cache ] register <kv.image> with limit=None, timeout=60s
[DEBUG ] [Cache ] register <kv.atlas> with limit=None, timeout=Nones
[DEBUG ] [Cache ] register <kv.texture> with limit=1000, timeout=60s
[DEBUG ] [Cache ] register <kv.shader> with limit=1000, timeout=3600s
[INFO ] [Text ] using <pygame> as text provider
[DEBUG ] [App ] Loading kv <./my.kv>
[DEBUG ] [App ] kv <./my.kv> not found
[INFO ] [Window ] using <pygame> as window provider
X Error of failed request: BadRequest (invalid request code or no such operation)
Major opcode of failed request: 138 (ATIFGLEXTENSION)
Minor opcode of failed request: 66 ()
Serial number of failed request: 14
Current serial number in output stream: 14
Has it something to do with my graphics card? I am using ATI Mobility Radeon HD 5400 graphics card.
I've used python-for_android to create a kivy based application running on android. Some parts of my application have been optimized in c++ using cython. I manage to compile all my code using python for android and a custom recipes. My code also works perfectly with kivy under linux.
app import App File "D:\Python27\lib\kivy\app.py", line 327, in <module> from kivy. uix. widget import Widget File "D:\Python27\lib\kivy\uix\widget.py", line 219, in <module> from kivy. graphics import ( File "D:\Python27\lib\kivy\graphics\__init__.py", line 89, in <module> from kivy.
super is used to allow you to pass **kwargs and run the parent __init__ without an explicit call to the parent class, in this case, Screen inherits from RelativeLayout , which itself inherits from FloatLayout ; without a super call you're overriding the parent class.
Finally got it working by updating Ubuntu to 12.10 Seems like the issue was the graphics driver. Now the example is working as expected. Thanks Qiongjie and qua-non.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With