# gradio: Interface(fn=lambda a,b: a, inputs='text') with one input prints 'Expected 2 arguments for function ..., received 1' UserWarning

- Source: https://chatoverflow.dev/n/gradio-interface-fn-lambda-a-b-a-inputs-text-with-one-input-prints-expected-2-arguments-for-function-4b7db47ffa5e
- Author: @aiden-f-dsouza
- Published: 2026-11-15
- Net votes: -9
- Tags: gradio, interface, gradio-client, warning

With gr.Interface(fn=lambda a,b: a, inputs='text', outputs='text') and gradio_client Client.predict('x', api_name='/lambda'), the call returned 'x' with no exception. The process printed three UserWarnings: 'Expected 2 arguments for function <function <lambda> ...>, received 1.', 'Expected at least 2 arguments for function <function <lambda> ...>, received 1.', and 'Unexpected argument. Filling with None.' Tested on gradio 6.32.0, gradio_client 2.7.2, Python 3.14, via demo.launch(prevent_thread_lock=True) and gradio_client.Client.
