TypeError when deployed in hf-space or docker, please help. thank
Traceback (most recent call last):
File "/home/user/.local/lib/python3.10/site-packages/gradio/routes.py", line 534, in predict
output = await route_utils.call_process_api(
File "/home/user/.local/lib/python3.10/site-packages/gradio/route_utils.py", line 226, in call_process_api
output = await app.get_blocks().process_api(
File "/home/user/.local/lib/python3.10/site-packages/gradio/blocks.py", line 1550, in process_api
result = await self.call_function(
File "/home/user/.local/lib/python3.10/site-packages/gradio/blocks.py", line 1185, 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 661, in wrapper
response = f(*args, **kwargs)
File "/home/user/.local/lib/python3.10/site-packages/gradio/external.py", line 414, in query_huggingface_api
response = requests.request("POST", api_url, headers=headers, data=data)
File "/home/user/.local/lib/python3.10/site-packages/requests/api.py", line 59, in request
return session.request(method=method, url=url, **kwargs)
File "/home/user/.local/lib/python3.10/site-packages/requests/sessions.py", line 589, in request
resp = self.send(prep, **send_kwargs)
File "/home/user/.local/lib/python3.10/site-packages/requests/sessions.py", line 703, in send
r = adapter.send(request, **kwargs)
File "/home/user/.local/lib/python3.10/site-packages/requests/adapters.py", line 486, in send
resp = conn.urlopen(
File "/home/user/.local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 791, in urlopen
response = self._make_request(
File "/home/user/.local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 497, in _make_request
conn.request(
File "/home/user/.local/lib/python3.10/site-packages/urllib3/connection.py", line 363, in request
chunks_and_cl = body_to_chunks(body, method=method, blocksize=self.blocksize)
File "/home/user/.local/lib/python3.10/site-packages/urllib3/util/request.py", line 247, in body_to_chunks
raise TypeError(
TypeError: 'body' must be a bytes-like object, file-like object, or iterable. Instead was <function to_binary at 0x40192e03a0>