ValueError: Width and height must be >= 0

402 views
Skip to first unread message

Nde Lucien

unread,
Dec 3, 2021, 5:07:53 AM12/3/21
to Kivy users support

Hello evryone, i have a problem. i'm building a massive application with kivy md and so far ive been running it solely on my laptop. and i make sure to satisfy every error while it runs on my pc. i just recently started building for my mobile phone with buildozer and i ran into this error ValueError: Width and height must be >= 0. This is a logcat output. i tried following the traceback to see which line in my code causes the error. the only reference to my code is the MDApp.run() line. I'm at a loss of how to proceed. would appreciate some help
Below is the traceback:

Traceback (most recent call last):
12-03 10:49:34.745 11777 11819 I python  :    File "/home/darkmatter/karnivore/.buildozer/android/app/main.py", line 3994, in <module>
12-03 10:49:34.745 11777 11819 I python  :    File "/home/darkmatter/karnivore/.buildozer/android/platform/build-armeabi-v7a/build/python-installs/karnivore/kivy/app.py", line 950, in run
12-03 10:49:34.745 11777 11819 I python  :    File "/home/darkmatter/karnivore/.buildozer/android/platform/build-armeabi-v7a/build/python-installs/karnivore/kivy/base.py", line 582, in runTouchApp
12-03 10:49:34.746 11777 11819 I python  :    File "/home/darkmatter/karnivore/.buildozer/android/platform/build-armeabi-v7a/build/python-installs/karnivore/kivy/base.py", line 347, in mainloop
12-03 10:49:34.746 11777 11819 I python  :    File "/home/darkmatter/karnivore/.buildozer/android/platform/build-armeabi-v7a/build/python-installs/karnivore/kivy/base.py", line 387, in idle
12-03 10:49:34.746 11777 11819 I python  :    File "/home/darkmatter/karnivore/.buildozer/android/platform/build-armeabi-v7a/build/python-installs/karnivore/kivy/clock.py", line 733, in tick
12-03 10:49:34.746 11777 11819 I python  :    File "/home/darkmatter/karnivore/.buildozer/android/platform/build-armeabi-v7a/build/python-installs/karnivore/kivy/clock.py", line 776, in post_idle
12-03 10:49:34.746 11777 11819 I python  :    File "kivy/_clock.pyx", line 616, in kivy._clock.CyClockBase._process_events
12-03 10:49:34.746 11777 11819 I python  :    File "kivy/_clock.pyx", line 649, in kivy._clock.CyClockBase._process_events
12-03 10:49:34.746 11777 11819 I python  :    File "kivy/_clock.pyx", line 645, in kivy._clock.CyClockBase._process_events
12-03 10:49:34.746 11777 11819 I python  :    File "kivy/_clock.pyx", line 218, in kivy._clock.ClockEvent.tick
12-03 10:49:34.746 11777 11819 I python  :    File "/home/darkmatter/karnivore/.buildozer/android/platform/build-armeabi-v7a/build/python-installs/karnivore/kivy/uix/boxlayout.py", line 323, in do_layout
12-03 10:49:34.746 11777 11819 I python  :    File "kivy/properties.pyx", line 498, in kivy.properties.Property.__set__
12-03 10:49:34.747 11777 11819 I python  :    File "kivy/properties.pyx", line 1364, in kivy.properties.ReferenceListProperty.set
12-03 10:49:34.747 11777 11819 I python  :    File "kivy/properties.pyx", line 523, in kivy.properties.Property.set
12-03 10:49:34.747 11777 11819 I python  :    File "kivy/properties.pyx", line 545, in kivy.properties.Property.set
12-03 10:49:34.747 11777 11819 I python  :    File "kivy/properties.pyx", line 600, in kivy.properties.Property.dispatch
12-03 10:49:34.747 11777 11819 I python  :    File "kivy/_event.pyx", line 1248, in kivy._event.EventObservers.dispatch
12-03 10:49:34.747 11777 11819 I python  :    File "kivy/_event.pyx", line 1130, in kivy._event.EventObservers._dispatch
12-03 10:49:34.747 11777 11819 I python  :    File "/home/darkmatter/karnivore/.buildozer/android/platform/build-armeabi-v7a/build/python-installs/karnivore/kivy/lang/builder.py", line 69, in call_fn
12-03 10:49:34.747 11777 11819 I python  :    File "kivy/weakproxy.pyx", line 35, in kivy.weakproxy.WeakProxy.__setattr__
12-03 10:49:34.747 11777 11819 I python  :    File "kivy/properties.pyx", line 498, in kivy.properties.Property.__set__
12-03 10:49:34.748 11777 11819 I python  :    File "kivy/properties.pyx", line 545, in kivy.properties.Property.set
12-03 10:49:34.748 11777 11819 I python  :    File "kivy/properties.pyx", line 600, in kivy.properties.Property.dispatch
12-03 10:49:34.748 11777 11819 I python  :    File "kivy/_event.pyx", line 1248, in kivy._event.EventObservers.dispatch
12-03 10:49:34.748 11777 11819 I python  :    File "kivy/_event.pyx", line 1154, in kivy._event.EventObservers._dispatch
12-03 10:49:34.748 11777 11819 I python  :    File "kivy/properties.pyx", line 1319, in kivy.properties.ReferenceListProperty.trigger_change
12-03 10:49:34.748 11777 11819 I python  :    File "kivy/properties.pyx", line 1334, in kivy.properties.ReferenceListProperty.trigger_change
12-03 10:49:34.748 11777 11819 I python  :    File "kivy/properties.pyx", line 600, in kivy.properties.Property.dispatch
12-03 10:49:34.748 11777 11819 I python  :    File "kivy/_event.pyx", line 1248, in kivy._event.EventObservers.dispatch
12-03 10:49:34.748 11777 11819 I python  :    File "kivy/_event.pyx", line 1154, in kivy._event.EventObservers._dispatch
12-03 10:49:34.749 11777 11819 I python  :    File "/home/darkmatter/karnivore/.buildozer/android/platform/build-armeabi-v7a/build/python-installs/karnivore/kivymd/uix/behaviors/elevation.py", line 1051, in _update_shadow
12-03 10:49:34.749 11777 11819 I python  :    File "/home/darkmatter/karnivore/.buildozer/android/platform/build-armeabi-v7a/build/python-installs/karnivore/PIL/Image.py", line 2524, in new
12-03 10:49:34.749 11777 11819 I python  :    File "/home/darkmatter/karnivore/.buildozer/android/platform/build-armeabi-v7a/build/python-installs/karnivore/PIL/Image.py", line 2503, in _check_size
12-03 10:49:34.749 11777 11819 I python  :  ValueError: Width and height must be >= 0
12-03 10:49:34.749 11777 11819 I python  : Python for android ended.

Robert

unread,
Dec 3, 2021, 12:13:52 PM12/3/21
to Kivy users support
It looks like the error comes when building kv containing KivyMD, check you are using the same version of KivMD on the desktop and on Android

Otherwise I have no suggestion.

Nde Lucien

unread,
Dec 4, 2021, 7:11:43 AM12/4/21
to Kivy users support

Thanks
How would the version of kivyMD and that on desktop vary. buildozer installs a new version of kivymd everytime it builds an app and i think my desktop has the latest version of kivymd

Robert

unread,
Dec 4, 2021, 1:28:03 PM12/4/21
to Kivy users support
It is common that people don't think about their desktop version.
Reply all
Reply to author
Forward
0 new messages