geekan / MetaGPT

šŸŒŸ The Multi-Agent Framework: First AI Software Company, Towards Natural Language Programming
https://deepwisdom.ai/
MIT License
43.62k stars 5.2k forks source link

šŸ›šŸž getting error out of the box : `TypeError: 'type' object is not subscriptable` #287

Open hemangjoshi37a opened 1 year ago

hemangjoshi37a commented 1 year ago

command : python startup.py "write a cli snake game"

Error :

Traceback (most recent call last):
  File "startup.py", line 7, in <module>
    from metagpt.roles import Architect, Engineer, ProductManager
  File "/home/hemang/Documents/GitHub/metagpt/metagpt/roles/__init__.py", line 9, in <module>
    from metagpt.roles.role import Role
  File "/home/hemang/Documents/GitHub/metagpt/metagpt/roles/role.py", line 15, in <module>
    from metagpt.config import CONFIG
  File "/home/hemang/Documents/GitHub/metagpt/metagpt/config.py", line 14, in <module>
    from metagpt.utils.singleton import Singleton
  File "/home/hemang/Documents/GitHub/metagpt/metagpt/utils/__init__.py", line 11, in <module>
    from metagpt.utils.token_counter import (
  File "/home/hemang/Documents/GitHub/metagpt/metagpt/utils/token_counter.py", line 99, in <module>
    def get_max_completion_tokens(messages: list[dict], model: str, default: int) -> int:
TypeError: 'type' object is not subscriptable
voidking commented 1 year ago

Try to use python3.9.x