Anyone has an idea why the following code generates error??
I call a func to get mouse coordinates:
def button_click(event):
x, y = event.x, event.y
print('{}, {}'.format(x, y))
return x, y
and then I want to assign the results to new variables in main:
x_cord, y_cord = app_root.bind('<ButtonRelease-1>', button_click)
by doing this I get the following error:
"x_cord, y_cord = app_root.bind('<ButtonRelease-1>', button_click)
ValueError: too many values to unpack"
Anyone has an idea why this is happening? Thank you everybody!