커뮤니티
포인트
쿠폰
내 강의실
국비 신청 내역
증명서
계정
로그아웃
학습 질문
개발 일지
나의 활동
답변 완료
yfinance company.info 오류
undefined주차
북마크
이*주
댓글
4
추천
1
조회수
42
조회수
42
답변 완료

* 겪고 있는 문제 상황을 최대한 자세하게 작성해주세요.

* 문제 해결을 위해 어떤 시도를 해보았는지 구체적으로 함께 알려주세요.


이 전 다른분들 즉문즉답에도 여러 번 나왔던 내용 같은데, info 불러오는 과정에서 오류가 납니다.

건너뛰고 뒷부분 내용을 이어가려 하는데, info에서 끌어오는 정보들이 많아 진도를 못나가겠네요.

기다려야 할까요?


스파르타 즉문즉답


company = yf.Ticker('TSLA')

company.info

-------------------------------------------------------------
Exception                                 Traceback (most recent call last)
<ipython-input-8-30298e918663> in <module>
      1 company = yf.Ticker('TSLA')
      2 
----> 3 company.info

/usr/local/lib/python3.8/dist-packages/yfinance/data.py in decrypt_cryptojs_aes_stores(data, keys)
    160                 pass
    161         if not success:
--> 162             raise Exception("yfinance failed to decrypt Yahoo data response")
    163 
    164     decoded_stores = json.loads(plaintext)

Exception: yfinance failed to decrypt Yahoo data response



name = company.info['shortName']
industry = company.info['industry']
marketcap = company.info['marketCap']
revenue = company.info['totalRevenue']


print(name, industry, marketcap, revenue)

-----------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-7-a37cf638f6fa> in <module>
----> 1 name = company.info['shortName']
      2 industry = company.info['industry']
      3 marketcap = company.info['marketCap']
      4 revenue = company.info['totalRevenue']
      5 

TypeError: 'NoneType' object is not subscriptable
취소
 공유
취소
댓글 0
댓글 알림
나의얼굴