litellm
litellm copied to clipboard
[Bug]: Testing proxy with local raises ModuleNotFoundError
What happened?
running litellm --test --local
raises the following error
..............
from proxy_server import app, save_worker_config, ProxyConfig
ModuleNotFoundError: No module named 'proxy_server'
It is raised from litellm/proxy/proxy_cli.py:229
if local:
from proxy_server import app, save_worker_config, ProxyConfig
else:
try:
from .proxy_server import (
app,
save_worker_config,
ProxyConfig,
)
except ImportError as e:
if "litellm[proxy]" in str(e):
# user is missing a proxy dependency, ask them to pip install litellm[proxy]
raise e
else:
# this is just a local/relative import error, user git cloned litellm
from proxy_server import (
app,
save_worker_config,
ProxyConfig,
)
Do we actually need --local
argument??
The fix could be something like, replace entire block with
from .proxy_server import save_worker_config, ProxyConfig
This issue it both test install litellm in a fresh environment as well as after git clone.
Relevant log output
No response
Twitter / LinkedIn details
No response
@ishaan-jaff
@ishaan-jaff @krrishdholakia
closing, the --local
flag is only for local dev