No server function matching "<function>" has been registered

After looking at every similar error on the community board and finding no resolution, I am bringing it here.

What I’m trying to do:
I am trying to do a simple test of uplink, replicating the video at https://www.youtube.com/watch?v=ebliOT-_ZEY

I have set up the uplink function on my desktop with the following code

import anvil.server

# Connect to Anvil Server
anvil.server.connect("client_<uplink key>")

@anvil.server.callable
def say_hello(name):
    response = 'Hello from uplink, %s!' % name
    print(response)
    return response
    
anvil.server.wait_forever()

I have the following code in form1 in Anvil

from ._anvil_designer import Form1Template
from anvil import *
import anvil.server

class Form1(Form1Template):
  def __init__(self, **properties):
    # Set Form properties and Data Bindings.
    self.init_components(**properties)

    # Any code you write here will run before the form opens.

  def button_1_click(self, **event_args):
    text = anvil.server.call( 'say_hello', self.text_box_input.text)
    self.label_output.txt = text

What I’ve tried and what’s not working:

when I run the app I get the error:

`anvil.server.NoServerFunctionError: No server function matching "say_hello" has been registered`

* `at Form1, line 13`

Here is a clone of the simple little app

What is displayed when you run your Uplink program at the command line? You might have error messages there that may explain the issue.

No error messages on the Uplink program.

I’m going to close this thread as I have decided not to use the Uplink Server.

The uplink code is a bit suspicious

anvil.server.connect("client_<uplink key>")

the "client_" prefix suggests it’s client uplink
and you can’t register server functions with client uplink

see docs:

Instead you probably want a server uplink key

3 Likes

Thanks for that. If I revisit the uplink facility, I will definitely move it to the server module.

I was originally interested in using uplink to interface with an external database, but have since decided to rely on Anvil’s internal db. If future plans call for interacting with an external facility, I’ll consider giving uplink a test run.