binchoo / selenium-kakao-vaccine-reservation

[PC / GUI /실행파일] 카카오 백신 예약. UX 개선.
GNU General Public License v3.0
13 stars 4 forks source link

[이슈] 좌표탐색을 누르면 cmd에 filenotfounderror: [error 2] no such file or directory #39

Closed binchoo closed 3 years ago

binchoo commented 3 years ago

재현 절차

'브라우저로 탐지' 버튼을 클릭

이슈 내용

좌표탐색을 누르면 cmd에 filenotfounderror: [error 2] no such file or directory 에러 발생

기대 결과

브라우저 정상 실행

참조

selenium-wire가 인증서를 찾지 못하는 문제로 보임. 동일 이슈: wkeeling/selenium-wire#310

binchoo commented 3 years ago

@Cjwuc 관련 에러 풀 텍스트로 볼 수 있을까요? 이 이슈에서 관련하여 얘기를 이어나가도록 합시다.

binchoo commented 3 years ago
> Exception in thread Thread-1:
> Traceback (most recent call last):
> File "threading.py", line 932, in _bootstrap_inner
> File "threading.py", line 870, in run
> File "qtmain.py", line 110, in
> capture_start = lambda: region_capture.start()
> File "service\lifecycle.py", line 27, in start
> self._handle_error(e)
> File "service\lifecycle.py", line 44, in _handle_error
> self.on_error_listener(self, error)
> File "qtmain.py", line 79, in error_handler
> raise error
> File "service\lifecycle.py", line 25, in start
> self._start()
> File "service\region.py", line 16, in _start
> self.open()
> File "service\selenium.py", line 13, in open
> self.driver = self.Driver(self.BinaryManager().install())
> File "seleniumwire\webdriver.py", line 99, in **init**
> File "seleniumwire\backend.py", line 24, in create
> File "seleniumwire\server.py", line 28, in **init**
> File "seleniumwire\utils.py", line 98, in extract_cert_and_key
> File "pkgutil.py", line 637, in get_data
> File "PyInstaller\loader\pyimod03_importers.py", line 371, in get_data
> FileNotFoundError: [Errno 2] No such file or directory:
Cjwuc commented 3 years ago

계정 로그인 까지는 되는데 웹브라우저 탐색이 안되네요 ㅠㅠ 개발자님 죄송합니더 ㅠㅠ

binchoo commented 3 years ago

@Cjwuc C:\Users\본인 계정\AppData\Roaming 폴더에

ca.crt.txt ca.key.txt

위 파일들의 확장자 .txt를 지우고서 넣어보세요. (텍스트 파일이 아니면 업로드가 안 돼서;)

Cjwuc commented 3 years ago

관리자님ㅠㅠ 같은 에러가 지속 됩니다 죄송합니다 번거롭게 해드려서ㅠㅠ

binchoo commented 3 years ago

@Cjwuc 저도 문제 재현 확인하였습니다. 수정 후 코멘트 드리겠습니다! 이슈 등록 감사합니다.

Cjwuc commented 3 years ago

개발자님 항상 고생하십니다!!!

binchoo commented 3 years ago

원인

seleniumwire 패키지가 소스코드 이외의 리소스 파일을 지니기 때문에 생기는 골 때리는 문제.

해결 방안

  1. .spec 파일을 생성하고 아래와 같이 코드를 추가한다. 문제되는 seleniumwire 패키지의 리소스를 얻어온 모습. https://github.com/binchoo/selenium-kakao-vaccine-reservation/blob/4eed5a4065b9c89744cf4bee2b125812737883c1/dist/window-build.spec#L5-L12

  2. 리소스 목록을 datas에 전달한다. https://github.com/binchoo/selenium-kakao-vaccine-reservation/blob/4eed5a4065b9c89744cf4bee2b125812737883c1/dist/window-build.spec#L17

  3. .py 파일이 아닌 .spec 파일로 실행 파일을 빌드하자. pyinstaller --onefile dist\window-build.spec

참조

https://stackoverflow.com/questions/46474588/pyinstaller-how-to-include-data-files-from-an-external-package-that-was-install https://pyinstaller.readthedocs.io/en/stable/spec-files.html

binchoo commented 3 years ago

@Cjwuc 님

새로운 배포 버전은 https://github.com/binchoo/selenium-kakao-vaccine-reservation/releases/tag/1.1 에서 확인 가능합니다.

메이저 이슈 발견해 주셔서 감사합니다.

Cjwuc commented 3 years ago

​ ​ -----Original Message----- From: @.> To: @.>; Cc: @.>; @.>; Sent: 2021-08-08 (일) 01:16:32 (GMT+09:00) Subject: Re: [binchoo/selenium-kakao-vaccine-reservation] [이슈] 좌표탐색을 누르면 cmd에 filenotfounderror: [error 2] no such file or directory (#39)

Closed #39. — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. ​ 안녕하세요 관리자님 ㅠㅠ 오류 해결 감사합니다 혹시 매크로 수행주기 설정시 2초혹은 1초로 설정시 계정 정지당할 위험 있을까요?? (프로그램 하나만 실행시)

binchoo commented 3 years ago

@Cjwuc 호출하는 api는 맵에서 쓰는 api이기 때문에 가능성이 크지 않다고 봅니다. 더 공격적으로 값을 책정해 보셔요.

Cjwuc commented 3 years ago

​ ​ -----Original Message----- From: @.> To: @.>; Cc: @.>; @.>; Sent: 2021-08-08 (일) 22:48:15 (GMT+09:00) Subject: Re: [binchoo/selenium-kakao-vaccine-reservation] [이슈] 좌표탐색을 누르면 cmd에 filenotfounderror: [error 2] no such file or directory (#39)

@Cjwuc 호출하는 api는 맵에서 쓰는 api이기 때문에 가능성이 크지 않다고 봅니다. 더 공격적으로 값을 책정해 보셔요. — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. ​ 개발자님!! 항상 고생하십니다... 개발자님 같은분들이 많아서 세상이 좋아지고 있는것 같습니다!!

binchoo commented 3 years ago

@Cjwuc 앱 개선에 큰 도움 주셔서 감사합니다. 🙇‍♂️