101dotxyz / GPTeam

GPTeam: An open-source multi-agent simulation
https://www.gpteamai.com/
MIT License
1.64k stars 254 forks source link

TypeError: unsupported operand type(s) for |: 'type' and 'types.GenericAlias' #64

Closed inagib21 closed 1 year ago

inagib21 commented 1 year ago

Hey I keep on getting this error and I'm curious if anyone would know why and how to fix it: (learn-env) a23@23s-MacBook-Pro GPTeam-main % poetry run world --turbo Traceback (most recent call last): File "", line 1, in File "/Users/a23/opt/anaconda3/envs/learn-env/lib/python3.9/importlib/init.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1030, in _gcd_import File "", line 1007, in _find_and_load File "", line 986, in _find_and_load_unlocked File "", line 680, in _load_unlocked File "", line 850, in exec_module File "", line 228, in _call_with_frames_removed File "/Users/a23/Downloads/GPTeam-main/src/main.py", line 12, in from src.utils.database.client import get_database File "/Users/a23/Downloads/GPTeam-main/src/utils/database/client.py", line 5, in from src.utils.database.sqlite import SqliteDatabase File "/Users/a23/Downloads/GPTeam-main/src/utils/database/sqlite.py", line 33, in class SqliteDatabase(DatabaseProviderSingleton): File "/Users/a23/Downloads/GPTeam-main/src/utils/database/sqlite.py", line 121, in SqliteDatabase self, table: Tables, data: dict | list[dict], upsert=False TypeError: unsupported operand type(s) for |: 'type' and 'types.GenericAlias' (learn-env) a23@23s-MacBook-Pro GPTeam-main %

Alec2435 commented 1 year ago

This is because you're using python 3.9 and those lines use a feature of python 3.10+. Please use a newer version of python to run this project

inagib21 commented 1 year ago

Thank you for the clarification !!!!