You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd like to cache a plot result. But when the plot size is large (~5MB), there will be an error to load it.
It seems that the result is saved to the log.csv, and loading the file encounters _csv.Error: field larger than field limit (131072).
This error is found in 4.26, 4.29, 4.31, but not found in 3.41. I found that in the older version, the plot result was saved in JSON file.
So this probably is a bug.
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/gradio/queueing.py", line 566, in process_events
response = await route_utils.call_process_api(
File "/usr/local/lib/python3.10/site-packages/gradio/route_utils.py", line 261, in call_process_api
output = await app.get_blocks().process_api(
File "/usr/local/lib/python3.10/site-packages/gradio/blocks.py", line 1786, in process_api
result = await self.call_function(
File "/usr/local/lib/python3.10/site-packages/gradio/blocks.py", line 1350, in call_function
prediction = await utils.async_iteration(iterator)
File "/usr/local/lib/python3.10/site-packages/gradio/utils.py", line 583, in async_iteration
return await iterator.__anext__()
File "/usr/local/lib/python3.10/site-packages/gradio/utils.py", line 576, in __anext__
return await anyio.to_thread.run_sync(
File "/usr/local/lib/python3.10/site-packages/anyio/to_thread.py", line 56, in run_sync
return await get_async_backend().run_sync_in_worker_thread(
File "/usr/local/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 2144, in run_sync_in_worker_thread
return await future
File "/usr/local/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 851, in run
result = context.run(func, *args)
File "/usr/local/lib/python3.10/site-packages/gradio/utils.py", line 559, in run_sync_iterator_async
return next(iterator)
File "/usr/local/lib/python3.10/site-packages/gradio/utils.py", line 742, in gen_wrapper
response = next(iterator)
File "/usr/local/lib/python3.10/site-packages/gradio/helpers.py", line 416, in sync_lazy_cache
self.cache_logger.flag(output)
File "/usr/local/lib/python3.10/site-packages/gradio/flagging.py", line 189, in flag
line_count = len(list(csv.reader(csvfile))) - 1
_csv.Error: field larger than field limit (131072)
System Info
Issue found in 4.26.0, 4.29.0, 4.31.0
Issue not found in 3.41.2
Severity
Blocking usage of gradio
The text was updated successfully, but these errors were encountered:
Describe the bug
I'd like to cache a plot result. But when the plot size is large (~5MB), there will be an error to load it.
It seems that the result is saved to the log.csv, and loading the file encounters
_csv.Error: field larger than field limit (131072)
.This error is found in 4.26, 4.29, 4.31, but not found in 3.41. I found that in the older version, the plot result was saved in JSON file.
So this probably is a bug.
Have you searched existing issues? 🔎
Reproduction
Screenshot
No response
Logs
System Info
Severity
Blocking usage of gradio
The text was updated successfully, but these errors were encountered: