Basic server call immediately timing out. I'm new to Anvil, can anyone help?

Hi all,

I am new to Anvil and experimenting to see if the platform suits me.

Perhaps I am making a rookie mistake here, but I can’t figure out why a basic server call isn’t working. When triggered, the session immediately times out (showing Session Expired notice).

My few lines of code are below. Can anyone help?

Server Python:

@anvil.server.callable
def input_validation():
return “working”

Form Python:

def button_generate_click(self, **event_args):
“”“This method is called when the button is clicked”“”
print(“trying…”)
valid = anvil.server.call(‘input_validation’)
self.label_reference.text = valid

“trying…” does print to console but session times out before label_reference.text is changed.

Thanks!

Welcome to the forum.

Please can you post a clone link so someone can take a look at your code? On the face of it, that code should work. So chances are there’s something else at play.

Depending on which IDE you are using, the clone instructions are either here for the original IDE :

or here for the newer beta IDE :

Hi David,

Thanks for the reply.

Here is a clone link for my app:
https://anvil.works/build#clone:GSUIY2HWW7A7GFXW=RIQ2ND5C5YGDVVKDOYB2PKLR

You’ll need to navigate to ‘Static Page’ under websites and click the generate button to trigger the server call.

Interestingly it seems to work fine on the cloned app!

The original instance must be bugged… I’ll scrap it and continue with the copy.

Thanks again

1 Like