Closed Eth030 closed 3 months ago
The error message you're encountering, TypeError: 'type' object is not subscriptable, typically arises when you attempt to use subscript notation (i.e., square brackets []) with a type that doesn't support this operation. This is a common issue when trying to use the newer type hinting syntax introduced in Python 3.9 with versions of Python that are older than 3.9.
In Python 3.9 and later, standard collection types such as list, dict, set, and tuple support direct use of square brackets for type annotations, which is not the case in earlier versions. If feasible, consider upgrading your Python environment to version 3.9 or newer. This will allow you to use the new type annotation syntax without encountering this issue.
Traceback (most recent call last): File "run.py", line 24, in
from chatdev.chat_chain import ChatChain
File "/home/issa/code/ai/ChatDev/chatdev/chat_chain.py", line 12, in
from chatdev.chat_env import ChatEnv, ChatEnvConfig
File "/home/issa/code/ai/ChatDev/chatdev/chat_env.py", line 52, in
class ChatEnv:
File "/home/issa/code/ai/ChatDev/chatdev/chat_env.py", line 107, in ChatEnv
def exist_bugs(self) -> tuple[bool, str]:
TypeError: 'type' object is not subscriptable
root@ubuntu:/home/issa/code/ai/ChatDev#