New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gr.load() failing with Error #5927
Comments
Hi @amitagh can you confirm both Spaces are running the latest version of Gradio? The Gradio version is set by the the |
Haven't set any specific version in both apps.
So I assume it will take latest version.
…On Tue, 17 Oct 2023, 05:56 Abubakar Abid, ***@***.***> wrote:
Hi @amitagh <https://github.com/amitagh> can you confirm both Spaces are
running the latest version of Gradio? The Gradio version is set by the the
sdk_version in the README file
—
Reply to this email directly, view it on GitHub
<#5927 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ASHD4BAHE7MGSZFW2NBUV4DX7XGDPAVCNFSM6AAAAAA6CAZUJWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONRVGQ3DSMJRGA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Below is what i see in Public space. So pretty much same. |
This issue seems to be with Gradio ChatInterface object. |
I have the same problem when calling a private space app from a public space app. The private space app is using Blocks (not Interface or ChatInterface):
If I comment the 'load' line out, the public space loads fine, otherwise I get this error message in the public space app:
|
I made multiple tries at this. While the .load works fine when the auth login is in the same Space, but using the API to load from a private space still throws and error. I'm wondering if there is another undocumented param that needs to be passed? nili = gr.load(src="spaces",name="dwipper/NILI-Mobile",hf_token=HUGGING_FACE_TOKEN)
I tried a couple combinations of the load statement in the private Spaces code. All generated the above error when restarting the public space:
|
This issue seems to be resolved in 4.1.1 |
I am having the same issue. .load works fine when I make my source space a public space, but when I change it to a private space I get an error. Interestingly, the space is successfully fetched and loaded, however when you interface with it, it usually has a thing, tries to send back an output and then simply produces an error message in the place of the output. Like I said, it works fine when the source space is made public. |
@ACOLLINS2 Might be a good point. I made both spaces public so that Support could see them, but originally, had a public/private mix when I had the error. I'll flip it back to see if it still works. |
@dwipper I've just managed to get mine to work again using a temporary fix. Temporary solution: I rolled back my gradio SDK version in HF Spaces to use 3.45.0 |
@abidlabs This Space https://huggingface.co/spaces/cimsai/NILI-Mobile-New calls this Space: https://huggingface.co/spaces/dwipper/NILI-Mobile-Simple . Both are 4.2.0. When these two spaces are public, the .load in NILI-Mobile-Simple works fine. But when the NILI-Mobile-Simple is made private, the NILI-Mobile-New Space throws this error (which is different than the above error): `Traceback (most recent call last):
404Sorry, we can’t find the page you are looking for. Traceback (most recent call last):
404Sorry, we can’t find the page you are looking for. The above exception was the direct cause of the following exception: Traceback (most recent call last): |
May be related to this issue: #6476 |
I believe that this issue is still open. My Spaces won't communicate to each other via gr.load and throws up the error below. The spaces in question (both made public for this test): Both use Gradio Version 4.9.1 The error produced by open_gradio_test when loading (and interacting with) private_gradio_test: Traceback (most recent call last): The above exception was the direct cause of the following exception: Traceback (most recent call last): |
I can confirm that this is not working on 4.9.1. Although I'm getting a slightly different error: Traceback (most recent call last):
File "/home/user/.local/lib/python3.10/site-packages/gradio/queueing.py", line 497, in process_events
response = await self.call_prediction(awake_events, batch)
File "/home/user/.local/lib/python3.10/site-packages/gradio/queueing.py", line 468, in call_prediction
raise Exception(str(error) if show_error else None) from error
Exception: None
Traceback (most recent call last):
File "/home/user/.local/lib/python3.10/site-packages/gradio/queueing.py", line 459, 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 1533, in process_api
result = await self.call_function(
File "/home/user/.local/lib/python3.10/site-packages/gradio/blocks.py", line 1151, in call_function
prediction = await anyio.to_thread.run_sync(
File "/home/user/.local/lib/python3.10/site-packages/anyio/to_thread.py", line 33, in run_sync
return await get_asynclib().run_sync_in_worker_thread(
File "/home/user/.local/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 877, in run_sync_in_worker_thread
return await future
File "/home/user/.local/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 807, in run
result = context.run(func, *args)
File "/home/user/.local/lib/python3.10/site-packages/gradio/utils.py", line 678, in wrapper
response = f(*args, **kwargs)
File "/home/user/.local/lib/python3.10/site-packages/gradio_client/client.py", line 959, in _inner
predictions = _predict(*data)
File "/home/user/.local/lib/python3.10/site-packages/gradio_client/client.py", line 994, in _predict
result = utils.synchronize_async(self._sse_fn_v1, helper, event_id)
File "/home/user/.local/lib/python3.10/site-packages/gradio_client/utils.py", line 808, in synchronize_async
return fsspec.asyn.sync(fsspec.asyn.get_loop(), func, *args, **kwargs) # type: ignore
File "/home/user/.local/lib/python3.10/site-packages/fsspec/asyn.py", line 103, in sync
raise return_result
File "/home/user/.local/lib/python3.10/site-packages/fsspec/asyn.py", line 56, in _runner
result[0] = await coro
File "/home/user/.local/lib/python3.10/site-packages/gradio_client/client.py", line 1188, in _sse_fn_v1
return await utils.get_pred_from_sse_v1(
File "/home/user/.local/lib/python3.10/site-packages/gradio_client/utils.py", line 414, in get_pred_from_sse_v1
return task.result()
File "/home/user/.local/lib/python3.10/site-packages/gradio_client/utils.py", line 422, in check_for_cancel
with helper.lock:
AttributeError: 'NoneType' object has no attribute 'lock'
Traceback (most recent call last):
File "/home/user/.local/lib/python3.10/site-packages/gradio/queueing.py", line 459, 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 1533, in process_api
result = await self.call_function(
File "/home/user/.local/lib/python3.10/site-packages/gradio/blocks.py", line 1151, in call_function
prediction = await anyio.to_thread.run_sync(
File "/home/user/.local/lib/python3.10/site-packages/anyio/to_thread.py", line 33, in run_sync
return await get_asynclib().run_sync_in_worker_thread(
File "/home/user/.local/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 877, in run_sync_in_worker_thread
return await future
File "/home/user/.local/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 807, in run
result = context.run(func, *args)
File "/home/user/.local/lib/python3.10/site-packages/gradio/utils.py", line 678, in wrapper
response = f(*args, **kwargs)
File "/home/user/.local/lib/python3.10/site-packages/gradio_client/client.py", line 959, in _inner
predictions = _predict(*data)
File "/home/user/.local/lib/python3.10/site-packages/gradio_client/client.py", line 994, in _predict
result = utils.synchronize_async(self._sse_fn_v1, helper, event_id)
File "/home/user/.local/lib/python3.10/site-packages/gradio_client/utils.py", line 808, in synchronize_async
return fsspec.asyn.sync(fsspec.asyn.get_loop(), func, *args, **kwargs) # type: ignore
File "/home/user/.local/lib/python3.10/site-packages/fsspec/asyn.py", line 103, in sync
raise return_result
File "/home/user/.local/lib/python3.10/site-packages/fsspec/asyn.py", line 56, in _runner
result[0] = await coro
File "/home/user/.local/lib/python3.10/site-packages/gradio_client/client.py", line 1188, in _sse_fn_v1
return await utils.get_pred_from_sse_v1(
File "/home/user/.local/lib/python3.10/site-packages/gradio_client/utils.py", line 414, in get_pred_from_sse_v1
return task.result()
File "/home/user/.local/lib/python3.10/site-packages/gradio_client/utils.py", line 422, in check_for_cancel
with helper.lock:
AttributeError: 'NoneType' object has no attribute 'lock'
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 497, in process_events
response = await self.call_prediction(awake_events, batch)
File "/home/user/.local/lib/python3.10/site-packages/gradio/queueing.py", line 468, in call_prediction
raise Exception(str(error) if show_error else None) from error
Exception: None
|
Actually I think the problem is not just restricted to private Spaces -- even public Spaces are failing for me, such as yours: import gradio as gr
gr.load("spaces/PharmaAI/private_gradio_test").launch() |
Weird I see the issue (and am about to open a PR with the fix) |
I get errors between these two public spaces: https://huggingface.co/spaces/cimsai/Compliance login: admin / admin In the backend space, the login works fine. In the front end space, it throws this error message: Fetching Space from: https://huggingface.co/spaces/dwipper/Compliance_Test To create a public link, set The above exception was the direct cause of the following exception: Traceback (most recent call last): |
I should have a fix for the core issue soon: #6810 |
Even with the fix suggested i still get the issue.
…On Sat, Dec 16, 2023 at 2:05 AM Abubakar Abid ***@***.***> wrote:
Closed #5927 <#5927> as
completed via #6810 <#6810>.
—
Reply to this email directly, view it on GitHub
<#5927 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ASHD4BBCV24FP4LFXGQ3XJ3YJSYC5AVCNFSM6AAAAAA6CAZUJWVHI2DSMVQWIX3LMV45UABCJFZXG5LFIV3GK3TUJZXXI2LGNFRWC5DJN5XDWMJRGI3DGNBTGU3DOOA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Are you running into this issue? #6744 I'm working on a fix |
mine is as reported in Issue #5927
…On Sun, Jan 28, 2024 at 6:45 AM Abubakar Abid ***@***.***> wrote:
Are you running into this issue? #6744
<#6744>
I'm working on a fix
—
Reply to this email directly, view it on GitHub
<#5927 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ASHD4BEJIP6BV2IEEH5PYHDYQWRCZAVCNFSM6AAAAAA6CAZUJWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMJTGM4TONBUG4>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Hi @abidlabs, just to share that I'm facing same issue as below. Thanks. Fetching Space from: https://huggingface.co/spaces/avfranco/ArchitectGPT |
Describe the bug
I am trying load a pvt space from a public space.
below is code for public space:
demo = gr.load(name="spaces/amitagh/TestChatIntf", hf_token = MY_HF_TOKEN_KEY)
demo.launch()
pvt space amitagh/TestChatIntf has just following simple code:
import gradio as gr
def echo(message, history):
return message
demo = gr.ChatInterface(fn=echo, examples=["hello", "hola", "merhaba"], title="Echo Bot")
demo.launch()
Getting below error:
Fetching Space from: https://huggingface.co/spaces/amitagh/TestChatIntf
Loaded as API: https://amitagh-testchatintf.hf.space ✔
/home/user/app/app.py:9: GradioUnusedKwargWarning: You have unused kwarg parameters in Chatbot, please remove them: {'likeable': False}
demo = gr.load(name="spaces/amitagh/TestChatIntf", hf_token = hf_key, api_key = hf_key)
Traceback (most recent call last):
File "/home/user/app/app.py", line 9, in
demo = gr.load(name="spaces/amitagh/TestChatIntf", hf_token = hf_key, api_key = hf_key)
File "/home/user/.local/lib/python3.10/site-packages/gradio/external.py", line 70, in load
return load_blocks_from_repo(
File "/home/user/.local/lib/python3.10/site-packages/gradio/external.py", line 109, in load_blocks_from_repo
blocks: gradio.Blocks = factory_methods[src](name, hf_token, alias, **kwargs)
File "/home/user/.local/lib/python3.10/site-packages/gradio/external.py", line 504, in from_spaces
return from_spaces_blocks(space=space_name, hf_token=hf_token)
File "/home/user/.local/lib/python3.10/site-packages/gradio/external.py", line 510, in from_spaces_blocks
return gradio.Blocks.from_config(client.config, predict_fns, client.src)
File "/home/user/.local/lib/python3.10/site-packages/gradio/blocks.py", line 801, in from_config
targets = [
File "/home/user/.local/lib/python3.10/site-packages/gradio/blocks.py", line 803, in
original_mapping[
KeyError: None
The text was updated successfully, but these errors were encountered: