Spaces:
Running
on
A10G
ERROR: Exception in ASGI application
MusicGen builds successfully but when I try to submit a request I get the following error in the log:
ERROR: Exception in ASGI application
Traceback (most recent call last):
File "/home/user/.pyenv/versions/3.9.17/lib/python3.9/site-packages/uvicorn/protocols/http/h11_impl.py", line 419, in run_asgi
result = await app( # type: ignore[func-returns-value]
File "/home/user/.pyenv/versions/3.9.17/lib/python3.9/site-packages/uvicorn/middleware/proxy_headers.py", line 84, in call
return await self.app(scope, receive, send)
File "/home/user/.pyenv/versions/3.9.17/lib/python3.9/site-packages/fastapi/applications.py", line 289, in call
await super().call(scope, receive, send)
File "/home/user/.pyenv/versions/3.9.17/lib/python3.9/site-packages/starlette/applications.py", line 122, in call
await self.middleware_stack(scope, receive, send)
File "/home/user/.pyenv/versions/3.9.17/lib/python3.9/site-packages/starlette/middleware/errors.py", line 184, in call
raise exc
File "/home/user/.pyenv/versions/3.9.17/lib/python3.9/site-packages/starlette/middleware/errors.py", line 162, in call
await self.app(scope, receive, _send)
File "/home/user/.pyenv/versions/3.9.17/lib/python3.9/site-packages/starlette/middleware/cors.py", line 83, in call
await self.app(scope, receive, send)
File "/home/user/.pyenv/versions/3.9.17/lib/python3.9/site-packages/starlette/middleware/exceptions.py", line 79, in call
raise exc
File "/home/user/.pyenv/versions/3.9.17/lib/python3.9/site-packages/starlette/middleware/exceptions.py", line 68, in call
await self.app(scope, receive, sender)
File "/home/user/.pyenv/versions/3.9.17/lib/python3.9/site-packages/fastapi/middleware/asyncexitstack.py", line 20, in call
raise e
File "/home/user/.pyenv/versions/3.9.17/lib/python3.9/site-packages/fastapi/middleware/asyncexitstack.py", line 17, in call
await self.app(scope, receive, send)
File "/home/user/.pyenv/versions/3.9.17/lib/python3.9/site-packages/starlette/routing.py", line 718, in call
await route.handle(scope, receive, send)
File "/home/user/.pyenv/versions/3.9.17/lib/python3.9/site-packages/starlette/routing.py", line 276, in handle
await self.app(scope, receive, send)
File "/home/user/.pyenv/versions/3.9.17/lib/python3.9/site-packages/starlette/routing.py", line 66, in app
response = await func(request)
File "/home/user/.pyenv/versions/3.9.17/lib/python3.9/site-packages/fastapi/routing.py", line 273, in app
raw_response = await run_endpoint_function(
File "/home/user/.pyenv/versions/3.9.17/lib/python3.9/site-packages/fastapi/routing.py", line 192, in run_endpoint_function
return await run_in_threadpool(dependant.call, **values)
File "/home/user/.pyenv/versions/3.9.17/lib/python3.9/site-packages/starlette/concurrency.py", line 41, in run_in_threadpool
return await anyio.to_thread.run_sync(func, *args)
File "/home/user/.pyenv/versions/3.9.17/lib/python3.9/site-packages/anyio/to_thread.py", line 33, in run_sync
return await get_asynclib().run_sync_in_worker_thread(
File "/home/user/.pyenv/versions/3.9.17/lib/python3.9/site-packages/anyio/_backends/_asyncio.py", line 877, in run_sync_in_worker_thread
return await future
File "/home/user/.pyenv/versions/3.9.17/lib/python3.9/site-packages/anyio/_backends/_asyncio.py", line 807, in run
result = context.run(func, *args)
File "/home/user/.pyenv/versions/3.9.17/lib/python3.9/site-packages/gradio/routes.py", line 289, in api_info
return gradio.blocks.get_api_info(config, serialize) # type: ignore
File "/home/user/.pyenv/versions/3.9.17/lib/python3.9/site-packages/gradio/blocks.py", line 517, in get_api_info
serializer = serializing.COMPONENT_MAPPINGtype
KeyError: 'dataset'
Hi, have you solved this issue? I got the same error in a different program.
any update?
I am also getting this error in /Surn/UnlimitedMusicGen
It may be a gradio version issue
No updates at this end, I'm afraid. In the meantime, I've moved to vast.ai and musicgen is working just fine on that platform.
I agree that this seems connected to gradio but it seems to only be an issue on huggingface.
Edit your Readme.md file
sdk: gradio
sdk_version: 3.33.1
worked for me, other version likely also work
It is either that or
add to pre-requirements.txt
pip>=23.2
gradio_client==0.2.7
Ah, that's done it. Thanks for the solution!
Edit your Readme.md file
sdk: gradio
sdk_version: 3.33.1
worked for me, other version likely also workIt is either that or
add to pre-requirements.txt
pip>=23.2
gradio_client==0.2.7
It works! thank you so much! 🥹