nalgeon / pokitoki

Humble GPT Telegram Bot
MIT License
314 stars 55 forks source link

TypeError: 'type' object is not subscriptable #28

Closed XamelionAG closed 1 year ago

XamelionAG commented 1 year ago

(env) projektxamelion@xamelion-server:~/pokitoki$ python3 -m bot.bot Traceback (most recent call last): File "/usr/lib/python3.8/runpy.py", line 194, in _run_module_as_main return _run_code(code, main_globals, None, File "/usr/lib/python3.8/runpy.py", line 87, in _run_code exec(code, run_globals) File "/home/projektxamelion/pokitoki/bot/bot.py", line 16, in from bot import askers File "/home/projektxamelion/pokitoki/bot/askers.py", line 15, in from bot import ai File "/home/projektxamelion/pokitoki/bot/ai/init.py", line 1, in from . import chatgpt File "/home/projektxamelion/pokitoki/bot/ai/chatgpt.py", line 6, in from bot.config import config File "/home/projektxamelion/pokitoki/bot/config.py", line 143, in class ConfigEditor: File "/home/projektxamelion/pokitoki/bot/config.py", line 204, in ConfigEditor def set_value(self, property: str, value: str) -> tuple[bool, bool]: TypeError: 'type' object is not subscriptable

//////why it happens?

nalgeon commented 1 year ago

The reason is probably the broken config file. Delete it and start from scratch (use config.example.yml as a starting point).

XamelionAG commented 1 year ago

thanks for fast response. i have done a new config.yml by cp and edited it.

result still the same.

nalgeon commented 1 year ago

Oh, I get it, thanks. You are using Python 3.8. The bot requires 3.11.

XamelionAG commented 1 year ago

it works thank you!

nalgeon commented 1 year ago

Sure!