커뮤니티
포인트
쿠폰
내 강의실
국비 신청 내역
증명서
계정
로그아웃
학습 질문
개발 일지
나의 활동
답변 완료
3-3 Dart 라이브러리 활용하기 질문입니다.
undefined주차
북마크
황*엽
댓글
1
추천
0
조회수
8
조회수
8
답변 완료

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

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


dart-fss 설치한 뒤 코드스니펫 붙여 넣고 api까지 입력했는데 오류가 나옵니다. 어떻게 해야 될까요..



스파르타 즉문즉답




import dart_fss as dart_fss
import pandas as pd


api_key = 'ef37d750bc639f9009d75af67b896f2c7f246521'
dart_fss.set_api_key(api_key=api_key)


corp_list = dart_fss.get_corp_list()


corp_list.corps


WARNING:fake_useragent:Error occurred during loading data. Trying to use cache server file https://useragent.melroy.org/cache.json
Traceback (most recent call last):
  File "/usr/lib/python3.7/urllib/request.py", line 1350, in do_open
    encode_chunked=req.has_header('Transfer-encoding'))
  File "/usr/lib/python3.7/http/client.py", line 1281, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/usr/lib/python3.7/http/client.py", line 1327, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "/usr/lib/python3.7/http/client.py", line 1276, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/usr/lib/python3.7/http/client.py", line 1036, in _send_output
    self.send(msg)
  File "/usr/lib/python3.7/http/client.py", line 976, in send
    self.connect()
  File "/usr/lib/python3.7/http/client.py", line 1443, in connect
    super().connect()
  File "/usr/lib/python3.7/http/client.py", line 948, in connect
    (self.host,self.port), self.timeout, self.source_address)
  File "/usr/lib/python3.7/socket.py", line 728, in create_connection
    raise err
  File "/usr/lib/python3.7/socket.py", line 716, in create_connection
    sock.connect(sa)
socket.timeout: timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/dist-packages/fake_useragent/utils.py", line 67, in get
    context=context,
  File "/usr/lib/python3.7/urllib/request.py", line 222, in urlopen
    return opener.open(url, data, timeout)
  File "/usr/lib/python3.7/urllib/request.py", line 525, in open
    response = self._open(req, data)
  File "/usr/lib/python3.7/urllib/request.py", line 543, in _open
    '_open', req)
  File "/usr/lib/python3.7/urllib/request.py", line 503, in _call_chain
    result = func(*args)
  File "/usr/lib/python3.7/urllib/request.py", line 1393, in https_open
    context=self._context, check_hostname=self._check_hostname)
  File "/usr/lib/python3.7/urllib/request.py", line 1352, in do_open
    raise URLError(err)
urllib.error.URLError: <urlopen error timed out>

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/dist-packages/fake_useragent/utils.py", line 141, in load
    verify_ssl=verify_ssl,
  File "/usr/local/lib/python3.7/dist-packages/fake_useragent/utils.py", line 102, in get_browser_user_agents
    verify_ssl=verify_ssl,
  File "/usr/local/lib/python3.7/dist-packages/fake_useragent/utils.py", line 87, in get
    raise FakeUserAgentError("Maximum amount of retries reached")
fake_useragent.errors.FakeUserAgentError: Maximum amount of retries reached

---------------------------------------------------------------------------
timeout                                   Traceback (most recent call last)
/usr/lib/python3.7/urllib/request.py in do_open(self, http_class, req, **http_conn_args)
   1349                 h.request(req.get_method(), req.selector, req.data, headers,
-> 1350                           encode_chunked=req.has_header('Transfer-encoding'))
   1351             except OSError as err: # timeout error


56 frames
timeout: timed out
During handling of the above exception, another exception occurred:

URLError                                  Traceback (most recent call last)
URLError: <urlopen error timed out>
During handling of the above exception, another exception occurred:

FakeUserAgentError                        Traceback (most recent call last)
FakeUserAgentError: Maximum amount of retries reached
During handling of the above exception, another exception occurred:

timeout                                   Traceback (most recent call last)
timeout: timed out
During handling of the above exception, another exception occurred:

URLError                                  Traceback (most recent call last)
URLError: <urlopen error timed out>
During handling of the above exception, another exception occurred:

FakeUserAgentError                        Traceback (most recent call last)
/usr/local/lib/python3.7/dist-packages/fake_useragent/utils.py in get(url, verify_ssl)
     85 
     86             if attempt == settings.HTTP_RETRIES:
---> 87                 raise FakeUserAgentError("Maximum amount of retries reached")
     88             else:
     89                 logger.debug(

FakeUserAgentError: Maximum amount of retries reached
취소
 공유
취소
댓글 0
댓글 알림
나의얼굴