Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] SSL: CERTIFICATE_VERIFY_FAILED #295

Open
1 task done
jhoogeboom opened this issue Apr 19, 2024 · 5 comments
Open
1 task done

[BUG] SSL: CERTIFICATE_VERIFY_FAILED #295

jhoogeboom opened this issue Apr 19, 2024 · 5 comments
Labels
bug Something isn't working contributions welcome Contributions are welcome

Comments

@jhoogeboom
Copy link

✔️ Expected Behaviour

When running the latest version (https://github.com/Second-Hand-Friends/kleinanzeigen-bot/releases/download/latest/kleinanzeigen-bot-darwin-amd64) on macos, doing a ./kleinanzeigen-bot download I expect to download the images without error.

🐞 Actual Behaviour

[INFO] Loaded 4 ads
[INFO] Start fetch task for your unsaved ads!
[INFO] New directory for ad created at downloaded-ads/ad_2739271815.
[INFO] Extracting information from ad with title "Vollholz Kleiderschrank"
[INFO] Found 2 images.
[ERROR] URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1000)>
[85601] Failed to execute script 'main' due to unhandled exception!
successfully removed temp profile /var/folders/gg/bctglzxn0k9fs9zrn0qbvtbc0000gn/T/uc_ixn2urxs

📋 Steps to Reproduce

On macOS:

curl -L https://github.com/Second-Hand-Friends/kleinanzeigen-bot/releases/download/latest/kleinanzeigen-bot-darwin-amd64 -o kleinanzeigen-bot
chmod 755 kleinanzeigen-bot
./kleinanzeigen-bot download

📺 What browsers are you seeing the problem on? (if applicable)

No response

💻 What operating systems are you seeing the problem on? (if applicable)

No response

📃 Relevant log output (if applicable)

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@jhoogeboom jhoogeboom added the bug Something isn't working label Apr 19, 2024
@jhoogeboom
Copy link
Author

This only occurs when I use the binary, when using the source, it works fine.

@Nuc1eoN
Copy link

Nuc1eoN commented May 10, 2024

Yup, same! On Linux. From source it works.

@sebthom sebthom added the contributions welcome Contributions are welcome label May 14, 2024
@sebthom
Copy link
Contributor

sebthom commented Jul 23, 2024

This is probably related to pyinstaller/pyinstaller#7229

Can you run the bot with -v and past the complete error stacktrace here.

@russellporter
Copy link

@sebthom here's the backtrace (I have installed your project on macos):

[DEBUG] Closing Browser session...
[ERROR] Traceback (most recent call last):
  File "urllib/request.py", line 1344, in do_open
  File "http/client.py", line 1327, in request
  File "http/client.py", line 1373, in _send_request
  File "http/client.py", line 1322, in endheaders
  File "http/client.py", line 1081, in _send_output
  File "http/client.py", line 1025, in send
  File "http/client.py", line 1468, in connect
  File "ssl.py", line 455, in wrap_socket
  File "ssl.py", line 1046, in _create
  File "ssl.py", line 1321, in do_handshake
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1000)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "kleinanzeigen_bot/__main__.py", line 9, in <module>
  File "kleinanzeigen_bot/__init__.py", line 898, in main
  File "asyncio/base_events.py", line 684, in run_until_complete
  File "kleinanzeigen_bot/__init__.py", line 114, in run
  File "kleinanzeigen_bot/__init__.py", line 857, in download_ads
  File "kleinanzeigen_bot/extract.py", line 49, in download_ad
  File "kleinanzeigen_bot/extract.py", line 246, in _extract_ad_page_info
  File "kleinanzeigen_bot/extract.py", line 83, in _download_images_from_ad_page
  File "urllib/request.py", line 240, in urlretrieve
  File "urllib/request.py", line 215, in urlopen
  File "urllib/request.py", line 515, in open
  File "urllib/request.py", line 532, in _open
  File "urllib/request.py", line 492, in _call_chain
  File "urllib/request.py", line 1392, in https_open
  File "urllib/request.py", line 1347, in do_open
urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1000)>

@sebthom
Copy link
Contributor

sebthom commented Aug 5, 2024

Thanks for the stacktrace. I pushed a patch that hopefully fixes the issue. Please try the latest release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working contributions welcome Contributions are welcome
Development

No branches or pull requests

4 participants