Hi! Just spotted a small documentation issue in Chapter 5, Step 2 of the Data Dashboard.
Issue
The code provided in Step 2 does not have an anvil.server.wait_forever(), so the client running uplink will not remain open.
Repro:
Run Chapter 5 and it will fail to retrieve data from the client running Uplink
Fix:
The code block provided in Chapter 5, Step 2 should be:
import anvil.server
anvil.server.connect(" your-uplink-key")
@anvil.server.callable
def get_marketing_data():
# access data on your local machine and return as a Python list
return [{'strategy':'Strategy A', 'count':200},
{'strategy':'Strategy B', 'count':185},
{'strategy':'Strategy C', 'count':175}]
anvil.server.wait_forever()