"problem" counter with tkinter interface

it works!. but it stops everything, awaits impulse! How can I solve?

Python side:

def counter():
s=ser.readline()
count=s
label['text']=count
label.after(500,counter)
counter()

How can I solve?

That depends. What is the problem?

Where is that function called? Why does it appear that the function is calling itself?

What code is the Arduino running?

And if this is a Python problem it may make a lot more sense to ask the question on Python forum.

...R
Python - Arduino demo