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

(fix) - update user error #2524

Merged
merged 1 commit into from
Mar 15, 2024
Merged

(fix) - update user error #2524

merged 1 commit into from
Mar 15, 2024

Conversation

ishaan-jaff
Copy link
Contributor

@ishaan-jaff ishaan-jaff commented Mar 15, 2024

I was seeing this error in my logs when running load tests. This PR fixes it

updating user table for id None
<class 'NoneType'>
Traceback (most recent call last):
  File "/Users/ishaanjaffer/Github/litellm/litellm/proxy/proxy_server.py", line 1430, in _update_user_cache
    existing_spend_obj = LiteLLM_UserTable(
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pydantic/main.py", line 171, in __init__
    self.__pydantic_validator__.validate_python(data, self_instance=self)
pydantic_core._pydantic_core.ValidationError: 1 validation error for LiteLLM_UserTable
user_id
  Input should be a valid string [type=string_type, input_value=None, input_type=NoneType]
    For further information visit https://errors.pydantic.dev/2.6/v/string_type
19:49:13 - LiteLLM Proxy:DEBUG: proxy_server.py:1461 - An error occurred updating user cache: 1 validation error for LiteLLM_UserTable
user_id
  Input should be a valid string [type=string_type, input_value=None, input_type=NoneType]
    For further information visit https://errors.pydantic.dev/2.6/v/string_type

Traceback (most recent call last):
  File "/Users/ishaanjaffer/Github/litellm/litellm/proxy/proxy_server.py", line 1430, in _update_user_cache
    existing_spend_obj = LiteLLM_UserTable(
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pydantic/main.py", line 171, in __init__
    self.__pydantic_validator__.validate_python(data, self_instance=self)
pydantic_core._pydantic_core.ValidationError: 1 validation error for LiteLLM_UserTable
user_id
  Input should be a valid string [type=string_type, input_value=None, input_type=NoneType]
    For further information visit https://errors.pydantic.dev/2.6/v/string_type

Copy link

vercel bot commented Mar 15, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
litellm ✅ Ready (Inspect) Visit Preview Mar 15, 2024 2:51am
litellm-dashboard ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 15, 2024 2:51am

@ishaan-jaff ishaan-jaff merged commit 31dcc6a into main Mar 15, 2024
10 checks passed
@ishaan-jaff ishaan-jaff deleted the litellm_fix_update_user branch March 15, 2024 15:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant