benitoro / stockholm

一个股票数据(沪深)爬虫和选股策略测试框架
GNU General Public License v2.0
1.37k stars 621 forks source link

The same problem with KeyError:'Data' #5

Open andyheroboy2016 opened 8 years ago

andyheroboy2016 commented 8 years ago

Dear Mr/ms benitoro I am interested in your project. While i run your code, there come out the same problem with KeyError:'Data' as last visitor. Let me introduce my environment: Centos 6.5 64bit--Python 3.5.2 | Anaconda 4.1.1(64-bit). The error code is as below: [root@www stockholm]# python main.py --reload=N --portfolio=Y Stockholm is starting...

Start portfolio testing...

file_data_load start...

file_data_load end... time cost: 2s

Traceback (most recent call last): File "main.py", line 34, in main() File "main.py", line 30, in main stockh.run() File "/dl1/stockholm-master/stockholm/stockholm.py", line 669, in run self.data_test(self.target_date, self.test_date_range, output_types) File "/dl1/stockholm-master/stockholm/stockholm.py", line 645, in data_test is_date_valid = self.check_date(all_quotes, date) File "/dl1/stockholm-master/stockholm/stockholm.py", line 469, in check_date for quote_data in quote['Data']: KeyError: 'Data'

Please help us out and work out this problem, or email me: 540137240@qq.com Thank you for your kind help in advance. Best Regards A New hobbier

jianhoo727 commented 3 years ago

i am having the same problem :/