litellm icon indicating copy to clipboard operation
litellm copied to clipboard

[Bug]: 'Batch' object has no attribute 'litellm_dailytagspend'

Open abarahonar opened this issue 8 months ago • 0 comments

What happened?

We are seing a lot these messages in our logs, ru

Relevant log output

Job "update_spend (trigger: interval[0:00:10], next run at: 2025-04-24 15:32:10 -04)" raised an exception
Traceback (most recent call last):
  File "/Users/abarahonar/.pyenv/versions/3.10.16/lib/python3.10/site-packages/apscheduler/executors/base.py", line 181, in run_coroutine_job
    retval = await job.func(*job.args, **job.kwargs)
  File "/Users/abarahonar/.pyenv/versions/3.10.16/lib/python3.10/site-packages/litellm/proxy/utils.py", line 2585, in update_spend
    await proxy_logging_obj.db_spend_update_writer.db_update_spend_transaction_handler(
  File "/Users/abarahonar/.pyenv/versions/3.10.16/lib/python3.10/site-packages/litellm/proxy/db/db_spend_update_writer.py", line 381, in db_update_spend_transaction_handler
    await self._commit_spend_updates_to_db_without_redis_buffer(
  File "/Users/abarahonar/.pyenv/versions/3.10.16/lib/python3.10/site-packages/litellm/proxy/db/db_spend_update_writer.py", line 515, in _commit_spend_updates_to_db_without_redis_buffer
    await DBSpendUpdateWriter.update_daily_tag_spend(
  File "/Users/abarahonar/.pyenv/versions/3.10.16/lib/python3.10/site-packages/litellm/proxy/db/db_spend_update_writer.py", line 1021, in update_daily_tag_spend
    await DBSpendUpdateWriter._update_daily_spend(
  File "/Users/abarahonar/.pyenv/versions/3.10.16/lib/python3.10/site-packages/litellm/proxy/db/db_spend_update_writer.py", line 965, in _update_daily_spend
    _raise_failed_update_spend_exception(
  File "/Users/abarahonar/.pyenv/versions/3.10.16/lib/python3.10/site-packages/litellm/proxy/utils.py", line 2630, in _raise_failed_update_spend_exception
    raise e
  File "/Users/abarahonar/.pyenv/versions/3.10.16/lib/python3.10/site-packages/litellm/proxy/db/db_spend_update_writer.py", line 868, in _update_daily_spend
    table = getattr(batcher, table_name)
AttributeError: 'Batch' object has no attribute 'litellm_dailytagspend'

Are you a ML Ops Team?

Yes

What LiteLLM version are you on ?

v1.67.2

Twitter / LinkedIn details

No response

abarahonar avatar Apr 24 '25 19:04 abarahonar