josw123 / dart-fss

한국 금융감독원에서 운영하는 다트(Dart) 시스템 크롤링을 위한 라이브러리
https://github.com/josw123/dart-fss
MIT License
326 stars 111 forks source link

NotFoundConsolidated #180

Closed elcsong closed 1 month ago

elcsong commented 1 month ago

안녕하세요, 특정 종목의 경우 에러가 발생합니다.


NotFoundConsolidated Traceback (most recent call last) Input In [23], in <cell line: 1>() ----> 1 comp.extract_fs(bgn_de='20240101', report_tp = ['half', 'quarter'])[0]

File ~\anaconda3\lib\site-packages\dart_fss\corp\corp.py:252, in Corp.extract_fs(self, bgn_de, end_de, fs_tp, separate, report_tp, lang, separator, dataset, cumulative, progressbar, skip_error, last_report_only) 204 def extract_fs(self, 205 bgn_de: str, 206 end_de: str = None, (...) 215 skip_error: bool = True, 216 last_report_only: bool = True) -> FinancialStatement: 217 """ 218 재무제표 검색 219 (...) 250 제무제표 검색 결과 251 """ --> 252 return extract(self.corp_code, bgn_de, end_de, fs_tp, separate, report_tp, lang, 253 separator, dataset, cumulative, progressbar, skip_error, last_report_only)

File ~\anaconda3\lib\site-packages\dart_fss\fs\extract.py:1552, in extract(corp_code, bgn_de, end_de, fs_tp, separate, report_tp, lang, separator, dataset, cumulative, progressbar, skip_error, last_report_only) 1550 msg = 'Unexpected Error' 1551 e.args = (*e.args, msg, ) -> 1552 raise e 1553 finally: 1554 dart.utils.spinner.spinner_enable = True

File ~\anaconda3\lib\site-packages\dart_fss\fs\extract.py:1524, in extract(corp_code, bgn_de, end_de, fs_tp, separate, report_tp, lang, separator, dataset, cumulative, progressbar, skip_error, last_report_only) 1522 dart.utils.spinner.spinner_enable = True 1523 if separate is False and (statements is None or all([statements[tp] is None for tp in statements])): -> 1524 raise NotFoundConsolidated('Could not find consolidated financial statements') 1526 statements = drop_empty_columns(statements) 1527 label_df = drop_empty_columns(label_df)

NotFoundConsolidated: ('Could not find consolidated financial statements', "An error occurred while fetching or analyzing {'rcp_no': '20240514000229', 'corp_code': '00369657', 'corp_name': '리노공업', 'stock_code': '058470', 'corp_cls': 'K', 'report_nm': '분기보고서 (2024.03)', 'flr_nm': '리노공업', 'rcept_dt': '20240514', 'rm': ''}.")

실행코드는 다음과 같습니다. 혹시나 하여 다른 종목으로 테스트해보았는데 다른 종목 문제없이 실행됩니다.

** 실행환경 sys version : 3.9.12 (main, Apr 4 2022, 05:22:27) [MSC v.1916 64 bit (AMD64)] dart version: '0.4.10'

** 실행 코드 comp = corp_list.find_by_corp_name('리노공업', exactly=True)[0] comp.extract_fs(bgn_de='20240101', report_tp = ['half', 'quarter'])[0] 스크린샷 2024-09-06 081524 스크린샷 2024-09-06 081603

확인 부탁 드립니다.

josw123 commented 1 month ago

안녕하세요.

NotFoundConsolidated는 연결재무제표가 없는 경우 발생하는 오류 입니다. 이 경우 separate=True 옵션을 통해서 개별재무제표를 추출하셔야 됩니다.

elcsong commented 1 month ago

감사합니다 :-)