2

I am implementing a mousewheel event in tkinter

def on_mousewheel(event,canvas):
    canvas.yview_scroll(event.delta,"units")

canvas.bind_all("<MouseWheel>", lambda event:on_mousewheel(event,canvas))

It gives me the error

UnicodeDecodeError: 'utf-8' codec can't decode byte 0xff in position 0: invalid start byte

I am using MacOS. If I drag the scrollbar everything is fine. if I try to use the Mac trackpad or other mouse to scroll, the tkinter shuts down giving me the above error

user239457
  • 1,766
  • 1
  • 16
  • 26

0 Answers0