josw123 / dart-fss

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

VisibleDeprecationWarning 이슈 #35

Closed lunatiee closed 4 years ago

lunatiee commented 4 years ago

제가 뭘 잘못 쓴건지 모르겠지만...

파일 저장은 되는데 warning이 계속 뜨네요. /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/numpy/core/_asarray.py:83: VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences (which is a list-or-tuple of lists-or-tuples-or ndarrays with different lengths or shapes) is deprecated. If you meant to do this, you must specify 'dtype=object' when creating the ndarray

josw123 commented 4 years ago

안녕하세요.

NumPy 버전이 1.19 이상에서 API가 deprecated 되어서 발생하는 warning인거 같습니다. 확인해 보니 pandas 라이브러리에서 보고된 #35434 이슈와 관련된 것으로 생각됩니다.

추가로 확인해 본결과 dart-fss 라이브러리 내부의 sorting_columns, drop_empty_columns의 함수에서 발생하고 있으며, 만약 pandas 라이브러리에서 수정되는데 시간이 걸리게 되면, 다음버전에서 warning이 뜨지 않도록 업데이트 하겠습니다.

당장 사용하시는데는 문제가 없기 때문에 그냥 사용하셔도 되나, 만약 warning이 보기 싫으시면 NumPy 1.18.5 버전으로 다운그레이드 하시거나, 아래와 같이 suppress 하셔서 사용하시면 될것 같습니다.

import warnings
warnings.filterwarnings("ignore", category=np.VisibleDeprecationWarning) 

조만간 warning이 발생하지 않도록 수정한 코드를 업로드 하도록 하겠습니다.

lunatiee commented 4 years ago

감사합니다. 코딩 초보라 하나하나 공부하면서 하고 있습니다. 큰 도움 되고 있습니다. 감사합니다.