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

Option to ignore SSL certificate #397

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

theophilegervet
Copy link

No description provided.

@@ -43,7 +44,10 @@ def download_image(row, timeout, user_agent_token, disallowed_header_directives)
user_agent_string += f" (compatible; {user_agent_token}; +https://github.com/rom1504/img2dataset)"
try:
request = urllib.request.Request(url, data=None, headers={"User-Agent": user_agent_string})
with urllib.request.urlopen(request, timeout=timeout) as r:
ctx = ssl.create_default_context()
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you are not using the new option here

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oups my bad, should be fixed :)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rom1504 Can we merge?

@davertor
Copy link

@rom1504 It would be nice to have the ignore_ssl_certificate option soon for avoiding SSL errors when downloading any dataset. What modifications are still needed to merge this PR into main?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants