question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Effects scroll exception

See original GitHub issue

Got this when someone was scrolling in my app. I could not make it happen when I tried scrolling directly.

Traceback (most recent call last):
  File "C:\py278_x64\libs\forced_choice\forced_choice\main.py", line 244, in run_app
    app.run()
  File "C:\py278_x64\Python\lib\site-packages\kivy\app.py", line 824, in run
    runTouchApp()
  File "C:\py278_x64\Python\lib\site-packages\kivy\base.py", line 484, in runTouchApp
    EventLoop.window.mainloop()
  File "C:\py278_x64\Python\lib\site-packages\kivy\core\window\window_pygame.py", line 381, in mainloop
    self._mainloop()
  File "C:\py278_x64\Python\lib\site-packages\kivy\core\window\window_pygame.py", line 285, in _mainloop
    EventLoop.idle()
  File "C:\py278_x64\Python\lib\site-packages\kivy\base.py", line 327, in idle
    self.dispatch_input()
  File "C:\py278_x64\Python\lib\site-packages\kivy\base.py", line 312, in dispatch_input
    post_dispatch_input(*pop(0))
  File "C:\py278_x64\Python\lib\site-packages\kivy\base.py", line 271, in post_dispatch_input
    wid.dispatch('on_touch_move', me)
  File "kivy\_event.pyx", line 701, in kivy._event.EventDispatcher.dispatch (kivy\_event.c:6962)
  File "C:\py278_x64\Python\lib\site-packages\kivy\uix\scrollview.py", line 671, in on_touch_move
    if self.dispatch('on_scroll_move', touch):
  File "kivy\_event.pyx", line 701, in kivy._event.EventDispatcher.dispatch (kivy\_event.c:6962)
  File "C:\py278_x64\Python\lib\site-packages\kivy\uix\scrollview.py", line 680, in on_scroll_move
    if self.dispatch_children('on_scroll_move', touch):
  File "kivy\_event.pyx", line 710, in kivy._event.EventDispatcher.dispatch_children (kivy\_event.c:7371)
  File "kivy\_event.pyx", line 706, in kivy._event.EventDispatcher.dispatch_generic (kivy\_event.c:7163)
  File "kivy\_event.pyx", line 710, in kivy._event.EventDispatcher.dispatch_children (kivy\_event.c:7371)
  File "kivy\_event.pyx", line 706, in kivy._event.EventDispatcher.dispatch_generic (kivy\_event.c:7163)
  File "kivy\_event.pyx", line 710, in kivy._event.EventDispatcher.dispatch_children (kivy\_event.c:7371)
  File "kivy\_event.pyx", line 705, in kivy._event.EventDispatcher.dispatch_generic (kivy\_event.c:7130)
  File "kivy\_event.pyx", line 701, in kivy._event.EventDispatcher.dispatch (kivy\_event.c:6962)
  File "C:\py278_x64\Python\lib\site-packages\kivy\uix\scrollview.py", line 704, in on_scroll_move
    self.effect_x.update(touch.x)
  File "C:\py278_x64\Python\lib\site-packages\kivy\effects\scroll.py", line 116, in update
    self.displacement += abs(val - self.history[-1][1])
IndexError: list index out of range

<bountysource-plugin>

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource. </bountysource-plugin>

Issue Analytics

  • State:open
  • Created 9 years ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
bgschaidcommented, Feb 9, 2021

Just wanted to open an issue on this but found this issue (seems that this still happens)

Are there any plans to fix this

As far as I can tell the problem is that the start-method is never called (which initializes self.history in the parent-class). But why that is is above my pay-grade

Simply catching the exception fixes this (there are no effects but I can live with that)

BTW: once self.history was “filled” by another scrolling it doesn’t fail anymore

scroll.py.patch.txt

2reactions
bgschaidcommented, Mar 12, 2021

Just wanted to open an issue on this but found this issue (seems that this still happens) Are there any plans to fix this As far as I can tell the problem is that the start-method is never called (which initializes self.history in the parent-class). But why that is is above my pay-grade Simply catching the exception fixes this (there are no effects but I can live with that) BTW: once self.history was “filled” by another scrolling it doesn’t fail anymore scroll.py.patch.txt

hello, i ran into this issue recently, can you please explain how to apply the patch? i am quite new to programming and this is a issue i hardly found info about

If you haven’t used the patch utility then it is easiest to apply the patch by hand: open the file listed on top of the file (probably without the venv in the path. But you find the location by looking at the stacktrace of your failure). Got to approximately line 111 and look for the lines with the “-” i nfron of them. Replace them with the lines with the “+” (without the + obviously)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Can I have onScrollListener for a ScrollView? - Stack Overflow
It is possible. See user2695685's answer. In short the following in onStart will do the trick: hsv.getViewTreeObserver().
Read more >
How To Fix Unknown Exception Error In After Effects - YouTube
In this Video I will show you how to fix adobe after effects warning: Unknow Exception 2021. I will also share 3 different...
Read more >
Flutter — Slivers and CustomScrollView | by Evan Fang
A CustomScrollView lets you supply slivers directly to create various scrolling effects, such as lists, grids, and expanding headers. Widgets in ...
Read more >
ScrollView - .NET MAUI - Microsoft Learn
NET MAUI ScrollView is a layout that's capable of scrolling its ... with the exception of the Content property, which means that they...
Read more >
CustomScrollView class - widgets library - Flutter - Dart API docs
A CustomScrollView lets you supply slivers directly to create various scrolling effects, such as lists, grids, and expanding headers.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found