FluxML / FastAI.jl

Repository of best practices for deep learning in Julia, inspired by fastai
https://fluxml.ai/FastAI.jl
MIT License
585 stars 51 forks source link

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

Closed MariusDrulea closed 1 year ago

MariusDrulea commented 1 year ago

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

lorenzoh commented 1 year ago

Sorry for the late reply! This seems an issue with your proxy or DataDeps.jl which does the downloading, so unfortunately I can't help you here