인프런 영문 브랜드 로고
인프런 영문 브랜드 로고

인프런 커뮤니티 질문&답변

나르샤님의 프로필 이미지
나르샤

작성한 질문수

파이썬 입문 및 웹 크롤링을 활용한 다양한 자동화 어플리케이션 제작하기

웹 브라우저 없는 스크랩핑 및 파싱 실습(2) - 네이버 카페 자동화

공부환경이 문제인지 알고싶습니다.

작성

·

496

0

Traceback (most recent call last):

File "/Users/jeongho/Documents/section3/tttt.py", line 47, in <module>

a.writeAttendCheck()

File "/Users/jeongho/Documents/section3/tttt.py", line 27, in writeAttendCheck

self.driver.switch_to_frame('cafe_main')

File "/anaconda3/envs/section3/lib/python3.5/site-packages/selenium/webdriver/remote/webdriver.py", line 775, in switch_to_frame

self._switch_to.frame(frame_reference)

File "/anaconda3/envs/section3/lib/python3.5/site-packages/selenium/webdriver/remote/switch_to.py", line 89, in frame

self._driver.execute(Command.SWITCH_TO_FRAME, {'id': frame_reference})

File "/anaconda3/envs/section3/lib/python3.5/site-packages/selenium/webdriver/remote/webdriver.py", line 312, in execute

self.error_handler.check_response(response)

File "/anaconda3/envs/section3/lib/python3.5/site-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response

raise exception_class(message, screen, stacktrace)

selenium.common.exceptions.NoSuchFrameException: Message: no such frame

(Session info: headless chrome=65.0.3325.181)

(Driver info: chromedriver=2.37.544337 (8c0344a12e552148c185f7d5117db1f28d6c9e85),platform=Mac OS X 10.13.3 x86_64)

[Finished in 3.578s]

'''

네이버 카페 로그인 후 출석체크하기 과정을 하고 완료를 했는데

위와 같이 에러가 나옵니다.

제가 오타나 잘못한게 있어서 선생님의 소스를 실행시켜도 위와 같이 나옵니다.

현재 맥북에서 공부를 하고 있는데요.

이런것도 코딩에 의한 오류인지..아니면 맥북이나 웹드라이버의 문제인지

알수 있을까요??

답변 1

0

좋은사람님의 프로필 이미지
좋은사람
지식공유자

네 안녕하세요. 나르샤님

selenium.common.exceptions.NoSuchFrameException: Message: no such frame

해당 오류를 살펴보니 프레임을 찾지 못해서 나오는 에러로 나옵니다.

맥 환경에서 저는 처음보는 에러지만 아래 똑같은 오류내용 처리를 살펴보니

  1. chrome을 쓰지 말고 firefox로 한 번 사용해 보는 것.

  2. 환경을 처음부터 다시 설정해 보는 것.

이 두가지가 핵심적인 것 같습니다.

아무쪼록 도움이 되시길 바랍니다.

감사합니다.

같은 오류 참조

https://stackoverflow.com/questions/45903714/selenium-nosuchframeexception-for-chrome-extension

나르샤님의 프로필 이미지
나르샤

작성한 질문수

질문하기