Skip to content
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

Can not print TogetherException if is contains non-json objects #108

Open
failable opened this issue Apr 23, 2024 · 1 comment
Open

Can not print TogetherException if is contains non-json objects #108

failable opened this issue Apr 23, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@failable
Copy link

Describe the bug

Can not print TogetherException if is contains non-json objects.

Screenshots

  File "/Users/user/git/work/ira/project/server/llm/utils.py", line 36, in llm_call
    print(responses)
  File "/Users/user/git/work/ira/project/.venv/lib/python3.10/site-packages/together/error.py", line 35, in __repr__
    repr_message = json.dumps(
  File "/Users/user/.rye/py/cpython@3.10.11/install/lib/python3.10/json/__init__.py", line 231, in dumps
    return _default_encoder.encode(obj)
  File "/Users/user/.rye/py/cpython@3.10.11/install/lib/python3.10/json/encoder.py", line 199, in encode
    chunks = self.iterencode(o, _one_shot=True)
  File "/Users/user/.rye/py/cpython@3.10.11/install/lib/python3.10/json/encoder.py", line 257, in iterencode
    return _iterencode(o, 0)
  File "/Users/user/.rye/py/cpython@3.10.11/install/lib/python3.10/json/encoder.py", line 179, in default
    raise TypeError(f'Object of type {o.__class__.__name__} '
TypeError: Object of type CIMultiDictProxy is not JSON serializable
error: Recipe `predict` failed on line 20 with exit code 1

Desktop (please complete the following information):

  • OS: [macOS]
@orangetin orangetin self-assigned this Apr 23, 2024
@orangetin orangetin added the bug Something isn't working label Apr 25, 2024
@i-khokhlov
Copy link

@orangetin, Hi! I am facing the same bug, during async call with python lib. Do you have some workaround?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants