cubenlp / ChatSQL

自然语言转SQL,直接连接数据库查询
Apache License 2.0
365 stars 48 forks source link

main.py 报错 KeyError: 'database' #21

Open xsw1006931693 opened 7 months ago

xsw1006931693 commented 7 months ago

(chatsql) F:\chat\ChatSQL-main>python F:\chat\ChatSQL-main\main.py Loading checkpoint shards: 14%|████████▏ | 1/7 [00:01<00:11, 1Loading checkpoint shards: 29%|████████████████▎ | 2/7 [00:03<0Loading checkpoint shards: 43%|████████████████████████▍ | 3/7 Loading checkpoint shards: 57%|████████████████████████████████▌ Loading checkpoint shards: 71%|████████████████████████████████████████▋ Loading checkpoint shards: 86%|████████████████████████████████████████████Loading checkpoint shards: 100%|████████████████████████████████████████████Loading checkpoint shards: 100%|█████████████████████████████████████████████████████████| 7/7 [00:12<00:00, 1.75s/it] Traceback (most recent call last): File "F:\chat\ChatSQL-main\main.py", line 99, in main() File "F:\chat\ChatSQL-main\main.py", line 31, in main db_con = Cur_db() File "F:\chat\ChatSQL-main\utility\db_tools.py", line 14, in init self.db_name = self.config['database']['DB'] File "D:\work\miniconda3\envs\chatsql\lib\configparser.py", line 963, in getitem raise KeyError(key) KeyError: 'database'

(chatsql) F:\chat\ChatSQL-main>a

Mosquito0352 commented 5 months ago

你好 请问怎么解决的呢