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

[Bug]: NoneType object is not iterable #8240

Open
Mte90 opened this issue Feb 4, 2025 · 3 comments
Open

[Bug]: NoneType object is not iterable #8240

Mte90 opened this issue Feb 4, 2025 · 3 comments
Labels
bug Something isn't working

Comments

@Mte90
Copy link

Mte90 commented Feb 4, 2025

What happened?

Image
I get this and in console

11:33:48 - LiteLLM Proxy:ERROR: internal_user_endpoints.py:395 - litellm.proxy.proxy_server.user_info(): Exception occured - 'NoneType' object is not iterable
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/litellm/proxy/management_endpoints/internal_user_endpoints.py", line 308, in user_info
    return await _get_user_info_for_proxy_admin()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/litellm/proxy/management_endpoints/internal_user_endpoints.py", line 431, in _get_user_info_for_proxy_admin
    for key in _keys_in_db:
TypeError: 'NoneType' object is not iterable

Relevant log output

Are you a ML Ops Team?

No

What LiteLLM version are you on ?

latest

Twitter / LinkedIn details

No response

@Mte90 Mte90 added the bug Something isn't working label Feb 4, 2025
@jaceyang97
Copy link

same issue

@Mte90
Copy link
Author

Mte90 commented Feb 5, 2025

https://github.com/BerriAI/litellm/blob/main/litellm/proxy/management_endpoints/internal_user_endpoints.py#L445

Looking here if there is no key there is the error as that case is not handled.

@ishaan-jaff it seems an easy fix but probably require some alerting to the user.

@ishaan-jaff
Copy link
Contributor

can we get help from a contributor PR on this + with testing ?

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