Skip to content

AttributeError: 'NoneType' object has no attribute 'prompt_tokens' #51

@Tangyueming311

Description

@Tangyueming311

I got this confusing bug.

Generating proposal 1/20
Failed to generate proposal:
Traceback (most recent call last):
File "/root/AI-Scientist-v2/ai_scientist/perform_ideation_temp_free.py", line 173, in generate_temp_free_idea
response_text, msg_history = get_response_from_llm(
^^^^^^^^^^^^^^^^^^^^^^
File "/root/miniconda3/envs/ai_scientist/lib/python3.11/site-packages/backoff/_sync.py", line 105, in retry
ret = target(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^
File "/root/AI-Scientist-v2/ai_scientist/../ai_scientist/llm.py", line 266, in get_response_from_llm
response = make_llm_call(
^^^^^^^^^^^^^^
File "/root/AI-Scientist-v2/ai_scientist/../ai_scientist/utils/token_tracker.py", line 201, in sync_wrapper
result.usage.prompt_tokens,
^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'prompt_tokens'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions