Skip to content

loading datasets fails under proxy, but Base.download works #271

Description

@MariusDrulea

Package Version

0.5.0

Julia Version

1.8.3

OS / Environment

Windows10

Describe the bug

The downloads do not work under proxy, although Base.download and Downloads.download works just fine. The HTTP_PROXY and HTTPS_PROXY are set properly, ENV["HTTP_PROXY"] = "http://127.0.0.1:3128".

using FastAI

imagenette2_url = "https://s3.amazonaws.com/fast-ai-imageclas/imagenette2-160.tgz"
FastAI.load(datasets()["imagenette2-160"])
Do you want to download the dataset from https://s3.amazonaws.com/fast-ai-imageclas/imagenette2-160.tgz to "D:\z_installed_programs\julia-depot\datadeps\fastai-imagenette2-160"?
[y/n]
y
ERROR: HTTP.Exceptions.RequestError(HTTP.Messages.Request:
"""
GET /fast-ai-imageclas/imagenette2-160.tgz HTTP/1.1
Host: s3.amazonaws.com
Accept: */*
User-Agent: HTTP.jl/1.8.3
Content-Length: 0

[Message Body was streamed]""", Base.IOError("X509 - Certificate verification failed, e.g. CRL, CA or signature check failed", -9984))

Using Downloads.download or Base.download works just fine under the same proxy conditions.

import Downloads
imagenette2_url = "https://s3.amazonaws.com/fast-ai-imageclas/imagenette2-160.tgz"
Downloads.download(imagenette2_url, "imagenette2-160.tgz")

Steps to Reproduce

see above

Expected Results

see above

Observed Results

see above

Relevant log output

see above

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions