Skip to content
Advertisement

Kivy ScrollView code error with scrollbars (or bug?)

I’m playing around with a Kivy Scrollview, adding scrollbars, etc, and getting a strange crash. I don’t specifically think it’s a bug, it’s probably some configuration element on Scrollviews that I’m missing, but who knows?

Given this code:

JavaScript

if I click or touch the Scrollbars in any way, I get this error:

JavaScript

However – if I first click the bitmap being scrolled, I can use the scrollbars with no problem.

So what’s up? Is there some Scrollview configuration I’m missing? (It took me a while to even find the scroll_type option to enable the bars, at first I could only mouse-drag the bitmap). Or is it a bug – given that it’s referencing history[-1], maybe that doesn’t exist yet?

Advertisement

Answer

Yep, it’s a bug. Just searched the Kivy repo on Github, found:

Effects Scroll Exception

The link does have a “workaround” patch, that you can manually apply to the installed library. Just tested the patch, it fixes my problem. Basically puts a try/except/return block around the line with history[-1]

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement