Server functions cannot return complex objects to client code. I was trying to get around this by pickling the object I wanted to return, storing it into a Media Object (which can be returned by server functions) and unpickling it on the client side. For instance:
#Server Code
@anvil.server.callable
def get_object():
media_object = anvil.BlobMedia(app_tables.files.get(Name='pickled_object')['Data'].get_bytes() )
return media_object
#Client Code
media_object= anvil.server.call_s('get_object')
object= pickle.loads(media_object.get_bytes())
The problem is that the pickle module is still not implemented into Skulpt; I get the following error: “NotImplementedImportError: pickle is not yet implemented in Skulpt”
Please implement the pickle in skulpt so that any object can be returned from server to client code