Skip to content

ValueError: An event handler (select_click) didn't receive enough input values (needed: 2, got: 1) #37

@jsmile

Description

@jsmile

I successfully installed inspiration extension and loaded artists images on inspiration tab in webui.
But I clicked an image and then webui say red colored error.
I use inspiration in vladmandic/automatic webui.

cmd console says :

File "F:\AI\Vlad1111\automatic\venv\lib\site-packages\gradio\routes.py", line 408, in run_predict
output = await app.get_blocks().process_api(
File "F:\AI\Vlad1111\automatic\venv\lib\site-packages\gradio\blocks.py", line 1313, in process_api
inputs = self.preprocess_data(fn_index, inputs, state)
File "F:\AI\Vlad1111\automatic\venv\lib\site-packages\gradio\blocks.py", line 1151, in preprocess_data
self.validate_inputs(fn_index, inputs)
File "F:\AI\Vlad1111\automatic\venv\lib\site-packages\gradio\blocks.py", line 1138, in validate_inputs
raise ValueError(
ValueError: An event handler (select_click) didn't receive enough input values (needed: 2, got: 1).
Check if the event handler calls a Javascript function, and make sure its return value is correct.
Wanted inputs:
[textbox, state]
Received inputs:
["NaN"]

Of cause, I saw No #34 issue.
I fix the code that [stable-diffusion-webui-inspiration]/javascript/inspiration.js
like this
From :
var imgs = gallery.querySelectorAll("img.h-full")
To This :
var imgs = gallery.querySelectorAll("img")

But the upper error massages occurs on cmd.
What is my problem ?
What should I do ?

( my runtime environment )
Python 3.10.10 on Windows
Version: a2485cf7 Fri May 12 21:12:24 2023 -0400
Setting environment tuning
nVidia CUDA toolkit detected
Torch 2.0.0+cu118
Torch backend: nVidia CUDA 11.8 cuDNN 8700

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions