I have a small bit of code running on another machine which needs to access an Anvil app. I am running in a virtual environment on the outside machine that has only anvil-uplink and nothing else, It fails on the first such call:
(wongpool) 23:23 ~/wongpool $ python anviltask.py
Connecting to wss://anvil.works/uplink
Anvil websocket open
Connected to "Default environment (published)" as SERVER
Traceback (most recent call last):
File "/home/jfalk/.virtualenvs/wongpool/lib/python3.7/site-packages/anvil/server.py", line 306, in call
return _do_call(args, kwargs, fn_name=fn_name)
File "/home/jfalk/.virtualenvs/wongpool/lib/python3.7/site-packages/anvil/server.py", line 298, in _do_call
return _threaded_server.do_call(args, kwargs, fn_name=fn_name, live_object=live_object)
File "/home/jfalk/.virtualenvs/wongpool/lib/python3.7/site-packages/anvil/_threaded_server.py", line 403, in do_call
raise _server._deserialise_exception(r["error"])
anvil._server.NoServerFunctionError: 'No server function matching "player_list" has been registered'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "anviltask.py", line 71, in <module>
update_text = update()
File "anviltask.py", line 45, in update
h = get_all_homers(d)
File "anviltask.py", line 6, in get_all_homers
result = anvil.server.call('player_list')
File "/home/jfalk/.virtualenvs/wongpool/lib/python3.7/site-packages/anvil/server.py", line 309, in call
raise _server._deserialise_exception(e.error_obj)
anvil._server.NoServerFunctionError: 'No server function matching "player_list" has
been registered
(wongpool) 23:26 ~/wongpool $
Note that the same function runs fine in the Anvil cloud.