Skip to content

Use via API, call /submit_wrapper error #592

Open
@zstorma

Description

@zstorma

The local service has been successfully started.

Use demo code in 'Use via API' page to call /submit_wrapper,
Image

but occurred an error:

Traceback (most recent call last):
  File "D:\AIGC\anaconda3\envs\py312\Lib\site-packages\gradio\queueing.py", line 625, in process_events
    response = await route_utils.call_process_api(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\AIGC\anaconda3\envs\py312\Lib\site-packages\gradio\route_utils.py", line 322, in call_process_api
    output = await app.get_blocks().process_api(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\AIGC\anaconda3\envs\py312\Lib\site-packages\gradio\blocks.py", line 2132, in process_api
    inputs = await self.preprocess_data(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\AIGC\anaconda3\envs\py312\Lib\site-packages\gradio\blocks.py", line 1780, in preprocess_data
    self.validate_inputs(block_fn, inputs)
  File "D:\AIGC\anaconda3\envs\py312\Lib\site-packages\gradio\blocks.py", line 1762, in validate_inputs
    raise ValueError(
ValueError: An event handler (submit_wrapper) didn't receive enough input values (needed: 45, got: 41).
Check if the event handler calls a Javascript function, and make sure its return value is correct.

After adding param_38 to param_41 in client.predict(), occurred another error:

TypeError: Parameter `param_38` is not a valid key-word argument. Please click on 'view API' in the footer of the Gradio app to see usage.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions