Serialization Error with pickle

Hi. I’m very new to Anvil and Python.
I’ve made a simple app for testing pickle, but I get the below error.
It works 100% in VS Code.

anvil.server.SerializationError: Cannot serialize return value from function. Cannot serialize <class ‘Pickle_Me.ServerModule1.example_class’> object at msg[‘response’]

My results does print.
I’ve tried several things but I’m obviously missing something. I appreciate your input.

Clone link:
https://anvil.works/build#clone:IXMQ64IOQIZDING3=HNSC72F7VTLH52CBXGKJE7SI

Hello and welcome!

Please check out the links in this post. Anvil can only return certain kinds of objects from server to client. There’s always ways to get to what you need though.

1 Like

Thanks @alcampopiano.
I’ll have a look