I recently started using Anvil. I setup a test app on the online IDE. I created a button, that calls a server function that returns some data. I ran the app online and everything works as expected.
I then cloned my project to my local PC (Windows 10)
I was able to get the app running and accessible locally. The issue comes up when doing things that call the functions with: anvil.server.call
It seems that the server callables are not functioning anymore when the app is running locally. Whenever one of the server functions get called. It errors with - IndexError: list index out of range. This only happens when running locally.
Example function that works online but not locally:
server side code
@anvil.server.callable
def test_function():
print('\n\nTest Function called\n\n')
Client side code
anvil.server.call('test_function')
Error resulting from when I call any function marked with @anvil.server.callable from the client side. Again this only happens running locally:
Calling function ‘test_function’ for app ‘monitor’ (ID server-R8FBenZ9npybHg==)
Single-use worker <anvil_downlink_host.full_python.worker.Worker object at 0x00000229C0B1A010>
Uncached worker <anvil_downlink_host.full_python.worker.Worker object at 0x00000229C0B1A010> died; retired? False
Uncached worker <anvil_downlink_host.full_python.worker.Worker object at 0x00000229C0B1A010> died; retired? False
Worker terminated for IDs set() (return code 1) d660b02232
[ERROR anvil.app-server.core] Error report from client code:
IndexError: list index out of range
Traceback:
C:/monitor/env/Lib/site-packages/anvil_downlink_worker/anvil/_server.py:60
Monitor/Data.py:14
C:/monitor/env/Lib/site-packages/anvil_downlink_worker/init.py:81
C:/monitor/env/Lib/site-packages/anvil_downlink_worker/init.py:223
app/Monitor/utils/Data.py:44
app/Monitor/Pages/Connections/init.py:25
I need to be able to host my app locally. Any help is appreciated.
anvil-app-server Version: 1.13.4