Closed
Description
Describe the bug
Getting the below error when loading loading one Space in another Space. These Spaces are on 4.4.0.
The app runs just fine in the target space......
Have you searched existing issues? 🔎
- I have searched and found no existing issues
Reproduction
https://huggingface.co/spaces/cimsai/Compliance
import gradio as gr
nili = gr.load(src="spaces",name="dwipper/Compliance_Test")
nili.launch()
import os
import gradio as gr
import requests
def login_auth(username, password):
if username == password:
return {login_row: gr.Row(visible=False), app_row: gr.Row(visible=True)}
else:
return {login_row: gr.Row(visible=True), app_row: gr.Row(visible=False)}
with gr.Blocks() as iface:
with gr.Row(visible=False) as app_row:
with gr.Column():
with gr.Row():
with gr.Column():
gr.Markdown(value="<H2 style='text-align: center;'>NILI Compliance Desktop</h2>")
with gr.Row(visible=True) as login_row:
with gr.Column():
gr.Markdown(value="<H2 style='text-align: center;'>NILI Login</h2>")
with gr.Row():
with gr.Column(scale=2):
gr.Markdown("")
with gr.Column(scale=1, variant='panel'):
username_tbox = gr.Textbox(label="User Name", interactive=True)
password_tbox = gr.Textbox(label="Password", interactive=True, type='password')
submit_btn = gr.Button(value='Submit', variant='primary', size='sm')
submit_btn.click(login_auth, inputs=[username_tbox, password_tbox], outputs=[login_row,app_row])
with gr.Column(scale=2):
gr.Markdown("")
with gr.Row():
with gr.Column(scale=4):
gr.HTML('<center><i>© 2023 Collegiate Influencer Marketing Systems, Inc.</i><br>CIMS.AI, CIMS.AI logo, NILI, NILI logo, and EzNIL are trademarks of Collegiate Influencer Marketing Systems, Inc.</center>')
iface.queue()
iface.launch(show_api=False)
Screenshot
No response
Logs
===== Application Startup at 2023-11-17 23:51:28 =====
Fetching Space from: https://huggingface.co/spaces/dwipper/Compliance_Test
Loaded as API: https://dwipper-compliance-test.hf.space ✔
Running on local URL: http://0.0.0.0:7860
To create a public link, set `share=True` in `launch()`.
Traceback (most recent call last):
File "/home/user/.local/lib/python3.10/site-packages/gradio/queueing.py", line 456, in call_prediction
output = await route_utils.call_process_api(
File "/home/user/.local/lib/python3.10/site-packages/gradio/route_utils.py", line 232, in call_process_api
output = await app.get_blocks().process_api(
File "/home/user/.local/lib/python3.10/site-packages/gradio/blocks.py", line 1531, in process_api
data = self.postprocess_data(fn_index, result["prediction"], state)
File "/home/user/.local/lib/python3.10/site-packages/gradio/blocks.py", line 1362, in postprocess_data
self.validate_outputs(fn_index, predictions) # type: ignore
File "/home/user/.local/lib/python3.10/site-packages/gradio/blocks.py", line 1336, in validate_outputs
raise ValueError(
ValueError: An event handler (_inner) didn't receive enough output values (needed: 2, received: 0).
Wanted outputs:
[<gradio.layouts.row.Row object at 0x7f190d026e00>, <gradio.layouts.row.Row object at 0x7f190d0244c0>]
Received outputs:
[]
Traceback (most recent call last):
File "/home/user/.local/lib/python3.10/site-packages/gradio/queueing.py", line 456, in call_prediction
output = await route_utils.call_process_api(
File "/home/user/.local/lib/python3.10/site-packages/gradio/route_utils.py", line 232, in call_process_api
output = await app.get_blocks().process_api(
File "/home/user/.local/lib/python3.10/site-packages/gradio/blocks.py", line 1531, in process_api
data = self.postprocess_data(fn_index, result["prediction"], state)
File "/home/user/.local/lib/python3.10/site-packages/gradio/blocks.py", line 1362, in postprocess_data
self.validate_outputs(fn_index, predictions) # type: ignore
File "/home/user/.local/lib/python3.10/site-packages/gradio/blocks.py", line 1336, in validate_outputs
raise ValueError(
ValueError: An event handler (_inner) didn't receive enough output values (needed: 2, received: 0).
Wanted outputs:
[<gradio.layouts.row.Row object at 0x7f190d026e00>, <gradio.layouts.row.Row object at 0x7f190d0244c0>]
Received outputs:
[]
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/user/.local/lib/python3.10/site-packages/gradio/queueing.py", line 501, in process_events
response = await self.call_prediction(awake_events, batch)
File "/home/user/.local/lib/python3.10/site-packages/gradio/queueing.py", line 465, in call_prediction
raise Exception(str(error) if show_error else None) from error
Exception: None
System Info
It's in a public Space
Severity
Blocking usage of gradio