Closed dveamer closed 2 years ago
멋진 프로그램 만들어주셔서 고맙습니다.
아래와 같은 상황을 발견했습니다.
Traceback (most recent call last): File "/tmp/test/fss.py", line 105, in execute fs = corp.extract_fs(bgn_de='20100101', separate=True, report_tp=['quarter']) File "/tmp/test/.env/lib/python3.9/site-packages/dart_fss/corp/corp.py", line 233, in extract_fs return extract(self.corp_code, bgn_de, end_de, fs_tp, separate, report_tp, lang, separator, dataset) File "/tmp/test/.env/lib/python3.9/site-packages/dart_fss/fs/extract.py", line 1325, in extract raise e File "/tmp/test/.env/lib/python3.9/site-packages/dart_fss/fs/extract.py", line 1304, in extract label_df = drop_empty_columns(label_df) File "/tmp/test/.env/lib/python3.9/site-packages/dart_fss/fs/extract.py", line 1135, in drop_empty_columns df[tp] = df_tp[columns] File "/tmp/test/.env/lib/python3.9/site-packages/pandas/core/frame.py", line 3030, in __getitem__ indexer = self.loc._get_listlike_indexer(key, axis=1, raise_missing=True)[1] File "/tmp/test/.env/lib/python3.9/site-packages/pandas/core/indexing.py", line 1266, in _get_listlike_indexer self._validate_read_indexer(keyarr, indexer, axis, raise_missing=raise_missing) File "/tmp/test/.env/lib/python3.9/site-packages/pandas/core/indexing.py", line 1316, in _validate_read_indexer raise KeyError(f"{not_found} not in index") KeyError: ('[] not in index', "An error occurred while fetching or analyzing {'rcp_no': '20100216000166', 'corp_code': '00104856', 'corp_name': '삼성증권', 'stock_code': '016360', 'corp_cls': 'Y', 'report_nm': '분기보고서 (2009.12)', 'flr_nm': '삼성증권', 'rcept_dt': '20100216', 'rm': ''}.") Traceback (most recent call last): File "execute.py", line 91, in execute_one fs = corp.extract_fs(bgn_de='20100101', separate=True, report_tp=['quarter']) File "/usr/local/lib/python3.7/site-packages/dart_fss/corp/corp.py", line 233, in extract_fs return extract(self.corp_code, bgn_de, end_de, fs_tp, separate, report_tp, lang, separator, dataset) File "/usr/local/lib/python3.7/site-packages/dart_fss/fs/extract.py", line 1344, in extract raise e File "/usr/local/lib/python3.7/site-packages/dart_fss/fs/extract.py", line 1326, in extract label_df = sorting_columns(label_df) File "/usr/local/lib/python3.7/site-packages/dart_fss/fs/extract.py", line 1128, in sorting_columns statements[tp] = statements[tp][ncolumns] File "/usr/local/lib/python3.7/site-packages/pandas/core/frame.py", line 3030, in __getitem__ indexer = self.loc._get_listlike_indexer(key, axis=1, raise_missing=True)[1] File "/usr/local/lib/python3.7/site-packages/pandas/core/indexing.py", line 1266, in _get_listlike_indexer self._validate_read_indexer(keyarr, indexer, axis, raise_missing=raise_missing) File "/usr/local/lib/python3.7/site-packages/pandas/core/indexing.py", line 1316, in _validate_read_indexer raise KeyError(f"{not_found} not in index") KeyError: ('[] not in index', "An error occurred while fetching or analyzing {'rcp_no': '20100216000166', 'corp_code': '00104856', 'corp_name': '삼성증권', 'stock_code': '016360', 'corp_cls': 'Y', 'report_nm': '분기보고서 (2009.12)', 'flr_nm': '삼성증권', 'rcept_dt': '20100216', 'rm': ''}.")
삼성증권의 2010년 반기보고서에 연결재무제표가 없고, 이로 인해 추출된 데이터가 없습니다.
추출된 데이터가 없을때 발생하는 KeyError는 수정된 상태입니다.
답변이 늦은점 죄송합니다.
멋진 프로그램 만들어주셔서 고맙습니다.
아래와 같은 상황을 발견했습니다.