#128 — [Bug]: Empty first row causes wrong type conversion
Repo: Twill-AI/twill-llm-engine State: closed | Status: done Assignee: meliascosta
Created: 2024-09-11 · Updated: 2024-09-13
Description
Steps to reproduce
To reproduce: 1.Type: Show plot of profit per vendor
should produce an error like
2024-09-10T15:39:49.677881090Z 15:39:49.676 ERROR websockets_router:1213 - 6ab950bb-a3d8-4cfa-8418-154ade1ae31f: Failed to handle LLM Engine response in LLM Chat 1:
2024-09-10T15:39:49.677900075Z Traceback (most recent call last):
2024-09-10T15:39:49.677908140Z File "/app/app/api/websockets_router.py", line 1111, in _run_llm_engine_with_context
2024-09-10T15:39:49.677939769Z values_rows=json.dumps(
2024-09-10T15:39:49.677946772Z ^^^^^^^^^^^
2024-09-10T15:39:49.677953354Z File "/usr/local/lib/python3.12/json/__init__.py", line 238, in dumps
2024-09-10T15:39:49.677959846Z **kw).encode(obj)
2024-09-10T15:39:49.677966208Z ^^^^^^^^^^^
2024-09-10T15:39:49.677972690Z File "/usr/local/lib/python3.12/json/encoder.py", line 200, in encode
2024-09-10T15:39:49.677979152Z chunks = self.iterencode(o, _one_shot=True)
2024-09-10T15:39:49.677985454Z ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-09-10T15:39:49.677992046Z File "/usr/local/lib/python3.12/json/encoder.py", line 258, in iterencode
2024-09-10T15:39:49.677998358Z return _iterencode(o, 0)
2024-09-10T15:39:49.678004660Z ^^^^^^^^^^^^^^^^^
2024-09-10T15:39:49.678011201Z File "/usr/local/lib/python3.12/json/encoder.py", line 180, in default
2024-09-10T15:39:49.678017754Z raise TypeError(f'Object of type {o.__class__.__name__} '
2024
## Notes
_Add implementation notes, blockers, and context here_
## Related
_Add wikilinks to related people, meetings, or other tickets_